diff options
author | Ying Xue <ying.xue@windriver.com> | 2014-03-27 12:54:36 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-03-27 13:08:37 -0400 |
commit | 46651c59c483f14fd35cf7df2104feac0e54e258 (patch) | |
tree | 06945336cf5bab75a27df13f7a6408d5d1e88672 /mm/interval_tree.c | |
parent | 987b58be376b8d087a9bb677f50592efc6ccb7c5 (diff) |
tipc: rename node create lock to protect node list and hlist
When a node is created, tipc_net_lock read lock is first held and
then node_create_lock is grabbed in order to prevent the same node
from being created and inserted into both node list and hlist twice.
But when we query node from the two node lists, we only hold
tipc_net_lock read lock without grabbing node_create_lock. Obviously
this locking policy is unable to guarantee that the two node lists
are always synchronized especially when the operation of changing
and accessing them occurs in different contexts like currently doing.
Therefore, rename node_create_lock to node_list_lock to protect the
two node lists, that is, whenever node is inserted into them or node
is queried from them, the node_list_lock should be always held. As a
result, tipc_net_lock read lock becomes redundant and then can be
removed from the node query functions.
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 'mm/interval_tree.c')
0 files changed, 0 insertions, 0 deletions