diff options
author | Ying Xue <ying.xue@windriver.com> | 2014-03-27 12:54:37 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-03-27 13:08:37 -0400 |
commit | 6c7a762e70637a256229f9dc9ca793908e8bd01b (patch) | |
tree | ad8c61e1fa48fdc36e799be6f8f67d257ee080b1 /net/tipc/name_distr.c | |
parent | 46651c59c483f14fd35cf7df2104feac0e54e258 (diff) | |
download | linux-6c7a762e70637a256229f9dc9ca793908e8bd01b.tar.bz2 |
tipc: tipc: convert node list and node hlist to RCU lists
Convert tipc_node_list list and node_htable hash list to RCU lists.
On read side, the two lists are protected with RCU read lock, and
on update side, node_list_lock is applied to them.
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/name_distr.c')
-rw-r--r-- | net/tipc/name_distr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/tipc/name_distr.c b/net/tipc/name_distr.c index c5904d196cd3..aff8041dc157 100644 --- a/net/tipc/name_distr.c +++ b/net/tipc/name_distr.c @@ -133,8 +133,8 @@ static void named_cluster_distribute(struct sk_buff *buf) struct tipc_node *n_ptr; struct tipc_link *l_ptr; - read_lock_bh(&tipc_net_lock); - list_for_each_entry(n_ptr, &tipc_node_list, list) { + rcu_read_lock(); + list_for_each_entry_rcu(n_ptr, &tipc_node_list, list) { spin_lock_bh(&n_ptr->lock); l_ptr = n_ptr->active_links[n_ptr->addr & 1]; if (l_ptr) { @@ -148,7 +148,7 @@ static void named_cluster_distribute(struct sk_buff *buf) } spin_unlock_bh(&n_ptr->lock); } - read_unlock_bh(&tipc_net_lock); + rcu_read_unlock(); kfree_skb(buf); } |