]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: use node_list_lock to protect tipc_num_nodes variable
authorYing Xue <ying.xue@windriver.com>
Thu, 27 Mar 2014 04:54:38 +0000 (12:54 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 27 Mar 2014 17:08:37 +0000 (13:08 -0400)
commit4cb0f6e1804b3874b721adbf8019afb8df495483
treed42b0b3357846cbd1c4fa15f94e7a671c50de84d
parentaa2ae0cd6ffaf4a7c86af6f49a65f99ae7e0a8a7
tipc: use node_list_lock to protect tipc_num_nodes variable

As tipc_node_list is protected by rcu read lock on read side, it's
unnecessary to hold node_list_lock to protect tipc_node_list in
tipc_node_get_links(). Instead, node_list_lock should just protects
tipc_num_nodes in the function.

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>
net/tipc/node.c