diff options
-rw-r--r-- | net/tipc/bearer.c | 2 | ||||
-rw-r--r-- | net/tipc/link.c | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c index 840db89e4283..3613e72e858e 100644 --- a/net/tipc/bearer.c +++ b/net/tipc/bearer.c | |||
@@ -747,7 +747,7 @@ int tipc_nl_bearer_disable(struct sk_buff *skb, struct genl_info *info) | |||
747 | return -EINVAL; | 747 | return -EINVAL; |
748 | } | 748 | } |
749 | 749 | ||
750 | bearer_disable(net, bearer, true); | 750 | bearer_disable(net, bearer, false); |
751 | rtnl_unlock(); | 751 | rtnl_unlock(); |
752 | 752 | ||
753 | return 0; | 753 | return 0; |
diff --git a/net/tipc/link.c b/net/tipc/link.c index 14f09b3cb87c..98609fdfb06a 100644 --- a/net/tipc/link.c +++ b/net/tipc/link.c | |||
@@ -344,6 +344,7 @@ void tipc_link_delete_list(struct net *net, unsigned int bearer_id, | |||
344 | struct tipc_net *tn = net_generic(net, tipc_net_id); | 344 | struct tipc_net *tn = net_generic(net, tipc_net_id); |
345 | struct tipc_link *link; | 345 | struct tipc_link *link; |
346 | struct tipc_node *node; | 346 | struct tipc_node *node; |
347 | bool del_link; | ||
347 | 348 | ||
348 | rcu_read_lock(); | 349 | rcu_read_lock(); |
349 | list_for_each_entry_rcu(node, &tn->node_list, list) { | 350 | list_for_each_entry_rcu(node, &tn->node_list, list) { |
@@ -353,12 +354,13 @@ void tipc_link_delete_list(struct net *net, unsigned int bearer_id, | |||
353 | tipc_node_unlock(node); | 354 | tipc_node_unlock(node); |
354 | continue; | 355 | continue; |
355 | } | 356 | } |
357 | del_link = !tipc_link_is_up(link) && !link->exp_msg_count; | ||
356 | tipc_link_reset(link); | 358 | tipc_link_reset(link); |
357 | if (del_timer(&link->timer)) | 359 | if (del_timer(&link->timer)) |
358 | tipc_link_put(link); | 360 | tipc_link_put(link); |
359 | link->flags |= LINK_STOPPED; | 361 | link->flags |= LINK_STOPPED; |
360 | /* Delete link now, or when failover is finished: */ | 362 | /* Delete link now, or when failover is finished: */ |
361 | if (shutting_down || !tipc_node_is_up(node)) | 363 | if (shutting_down || !tipc_node_is_up(node) || del_link) |
362 | tipc_link_delete(link); | 364 | tipc_link_delete(link); |
363 | tipc_node_unlock(node); | 365 | tipc_node_unlock(node); |
364 | } | 366 | } |