diff options
author | David S. Miller <davem@davemloft.net> | 2018-11-28 22:10:54 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-11-28 22:10:54 -0800 |
commit | e561bb29b650d2817d10a4858f1817836ed08399 (patch) | |
tree | 0bc92b5bb8a287a8e4a88732f3c64b56d126da58 /net/tipc | |
parent | 62e3a931788223048120357ab3f29dcb55c5ef79 (diff) | |
parent | 60b548237fed4b4164bab13c994dd9615f6c4323 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Trivial conflict in net/core/filter.c, a locally computed
'sdif' is now an argument to the function.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc')
-rw-r--r-- | net/tipc/node.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/tipc/node.c b/net/tipc/node.c index 2afc4f8c37a7..488019766433 100644 --- a/net/tipc/node.c +++ b/net/tipc/node.c @@ -584,12 +584,15 @@ static void tipc_node_clear_links(struct tipc_node *node) /* tipc_node_cleanup - delete nodes that does not * have active links for NODE_CLEANUP_AFTER time */ -static int tipc_node_cleanup(struct tipc_node *peer) +static bool tipc_node_cleanup(struct tipc_node *peer) { struct tipc_net *tn = tipc_net(peer->net); bool deleted = false; - spin_lock_bh(&tn->node_list_lock); + /* If lock held by tipc_node_stop() the node will be deleted anyway */ + if (!spin_trylock_bh(&tn->node_list_lock)) + return false; + tipc_node_write_lock(peer); if (!node_is_up(peer) && time_after(jiffies, peer->delete_at)) { |