diff options
Diffstat (limited to 'net/tipc/link.c')
-rw-r--r-- | net/tipc/link.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/tipc/link.c b/net/tipc/link.c index c723ee90219d..3a801452643d 100644 --- a/net/tipc/link.c +++ b/net/tipc/link.c | |||
@@ -297,14 +297,14 @@ void tipc_link_delete_list(unsigned int bearer_id, bool shutting_down) | |||
297 | 297 | ||
298 | rcu_read_lock(); | 298 | rcu_read_lock(); |
299 | list_for_each_entry_rcu(n_ptr, &tipc_node_list, list) { | 299 | list_for_each_entry_rcu(n_ptr, &tipc_node_list, list) { |
300 | spin_lock_bh(&n_ptr->lock); | 300 | tipc_node_lock(n_ptr); |
301 | l_ptr = n_ptr->links[bearer_id]; | 301 | l_ptr = n_ptr->links[bearer_id]; |
302 | if (l_ptr) { | 302 | if (l_ptr) { |
303 | tipc_link_reset(l_ptr); | 303 | tipc_link_reset(l_ptr); |
304 | if (shutting_down || !tipc_node_is_up(n_ptr)) { | 304 | if (shutting_down || !tipc_node_is_up(n_ptr)) { |
305 | tipc_node_detach_link(l_ptr->owner, l_ptr); | 305 | tipc_node_detach_link(l_ptr->owner, l_ptr); |
306 | tipc_link_reset_fragments(l_ptr); | 306 | tipc_link_reset_fragments(l_ptr); |
307 | spin_unlock_bh(&n_ptr->lock); | 307 | tipc_node_unlock(n_ptr); |
308 | 308 | ||
309 | /* Nobody else can access this link now: */ | 309 | /* Nobody else can access this link now: */ |
310 | del_timer_sync(&l_ptr->timer); | 310 | del_timer_sync(&l_ptr->timer); |
@@ -312,12 +312,12 @@ void tipc_link_delete_list(unsigned int bearer_id, bool shutting_down) | |||
312 | } else { | 312 | } else { |
313 | /* Detach/delete when failover is finished: */ | 313 | /* Detach/delete when failover is finished: */ |
314 | l_ptr->flags |= LINK_STOPPED; | 314 | l_ptr->flags |= LINK_STOPPED; |
315 | spin_unlock_bh(&n_ptr->lock); | 315 | tipc_node_unlock(n_ptr); |
316 | del_timer_sync(&l_ptr->timer); | 316 | del_timer_sync(&l_ptr->timer); |
317 | } | 317 | } |
318 | continue; | 318 | continue; |
319 | } | 319 | } |
320 | spin_unlock_bh(&n_ptr->lock); | 320 | tipc_node_unlock(n_ptr); |
321 | } | 321 | } |
322 | rcu_read_unlock(); | 322 | rcu_read_unlock(); |
323 | } | 323 | } |
@@ -474,11 +474,11 @@ void tipc_link_reset_list(unsigned int bearer_id) | |||
474 | 474 | ||
475 | rcu_read_lock(); | 475 | rcu_read_lock(); |
476 | list_for_each_entry_rcu(n_ptr, &tipc_node_list, list) { | 476 | list_for_each_entry_rcu(n_ptr, &tipc_node_list, list) { |
477 | spin_lock_bh(&n_ptr->lock); | 477 | tipc_node_lock(n_ptr); |
478 | l_ptr = n_ptr->links[bearer_id]; | 478 | l_ptr = n_ptr->links[bearer_id]; |
479 | if (l_ptr) | 479 | if (l_ptr) |
480 | tipc_link_reset(l_ptr); | 480 | tipc_link_reset(l_ptr); |
481 | spin_unlock_bh(&n_ptr->lock); | 481 | tipc_node_unlock(n_ptr); |
482 | } | 482 | } |
483 | rcu_read_unlock(); | 483 | rcu_read_unlock(); |
484 | } | 484 | } |