]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: Eliminate dynamic allocation of broadcast link data structures
authorAllan Stephens <allan.stephens@windriver.com>
Mon, 24 Oct 2011 14:29:26 +0000 (10:29 -0400)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Tue, 27 Dec 2011 16:33:47 +0000 (11:33 -0500)
commiteded528f7a7ee01957efe2385630207e7fd623ab
tree492e8ac4c1191b1c7be865efacc7833ebcb6fff9
parent0226cb7814940b713a68dfd031fb7333963fa838
tipc: Eliminate dynamic allocation of broadcast link data structures

Creates global variables to hold the broadcast link's pseudo-bearer and
pseudo-link structures, rather than allocating them dynamically. There
is only a single instance of each structure, and changing over to static
allocation allows elimination of code to handle the cases where dynamic
allocation was unsuccessful.

The memset in the teardown code may look like they aren't used, but
the same teardown code is run when there is a non-fatal error at
init-time, so that stale data isn't present when the user fixes the
cause of the soft error.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
net/tipc/bcast.c
net/tipc/bcast.h
net/tipc/net.c