summaryrefslogtreecommitdiff
path: root/net/tipc/bcast.c
diff options
context:
space:
mode:
authorYing Xue <ying.xue@windriver.com>2014-03-27 12:54:33 +0800
committerDavid S. Miller <davem@davemloft.net>2014-03-27 13:08:37 -0400
commit3874ccbba80f3b3127e94b1e055fb3d502a44718 (patch)
tree7a2e83182a543b53dfdca95f132e5463987576aa /net/tipc/bcast.c
parent78dfb789b69f161703ef322a0c2e3e61c7f7573a (diff)
tipc: convert tipc_bearers array to pointer list
As part of the effort to introduce RCU protection for the bearer list, we first need to change it to a list of pointers. Signed-off-by: Ying Xue <ying.xue@windriver.com> Reviewed-by: Erik Hugne <erik.hugne@ericsson.com> Reviewed-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/bcast.c')
-rw-r--r--net/tipc/bcast.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c
index e0feb7ef1469..b4f8c62a2777 100644
--- a/net/tipc/bcast.c
+++ b/net/tipc/bcast.c
@@ -668,9 +668,8 @@ void tipc_bcbearer_sort(void)
memset(bp_temp, 0, sizeof(bcbearer->bpairs_temp));
for (b_index = 0; b_index < MAX_BEARERS; b_index++) {
- struct tipc_bearer *b = &tipc_bearers[b_index];
-
- if (!b->active || !b->nodes.count)
+ struct tipc_bearer *b = bearer_list[b_index];
+ if (!b || !b->active || !b->nodes.count)
continue;
if (!bp_temp[b->priority].primary)