diff options
author | Jon Paul Maloy <jon.maloy@ericsson.com> | 2015-05-14 10:46:11 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-05-14 12:24:45 -0400 |
commit | b1c29f6b10d5981c89d3ea9b9991ca97141ed6d0 (patch) | |
tree | e0ad8668ed30f2d253423beba2c614baab2ec781 /net/tipc/link.c | |
parent | c16ead798ee31f154eb230a728de6c60d0786aab (diff) |
tipc: simplify resetting and disabling of bearers
Since commit 4b475e3f2f8e4e241de101c8240f1d74d0470494
("tipc: eliminate delayed link deletion at link failover") the extra
boolean parameter "shutting_down" is not any longer needed for the
functions bearer_disable() and tipc_link_delete_list().
Furhermore, the function tipc_link_reset_links(), called from
bearer_reset() is now unnecessary. We can just as well delete
all the links, as we do in bearer_disable(), and start over with
creating new links.
This commit introduces those changes.
Reviewed-by: Erik Hugne <erik.hugne@ericsson.com>
Reviewed-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/link.c')
-rw-r--r-- | net/tipc/link.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/net/tipc/link.c b/net/tipc/link.c index 374d52335168..266dbc6a34c1 100644 --- a/net/tipc/link.c +++ b/net/tipc/link.c | |||
@@ -311,8 +311,7 @@ void tipc_link_delete(struct tipc_link *l) | |||
311 | tipc_link_put(l); | 311 | tipc_link_put(l); |
312 | } | 312 | } |
313 | 313 | ||
314 | void tipc_link_delete_list(struct net *net, unsigned int bearer_id, | 314 | void tipc_link_delete_list(struct net *net, unsigned int bearer_id) |
315 | bool shutting_down) | ||
316 | { | 315 | { |
317 | struct tipc_net *tn = net_generic(net, tipc_net_id); | 316 | struct tipc_net *tn = net_generic(net, tipc_net_id); |
318 | struct tipc_link *link; | 317 | struct tipc_link *link; |
@@ -476,23 +475,6 @@ void tipc_link_reset(struct tipc_link *l_ptr) | |||
476 | link_reset_statistics(l_ptr); | 475 | link_reset_statistics(l_ptr); |
477 | } | 476 | } |
478 | 477 | ||
479 | void tipc_link_reset_list(struct net *net, unsigned int bearer_id) | ||
480 | { | ||
481 | struct tipc_net *tn = net_generic(net, tipc_net_id); | ||
482 | struct tipc_link *l_ptr; | ||
483 | struct tipc_node *n_ptr; | ||
484 | |||
485 | rcu_read_lock(); | ||
486 | list_for_each_entry_rcu(n_ptr, &tn->node_list, list) { | ||
487 | tipc_node_lock(n_ptr); | ||
488 | l_ptr = n_ptr->links[bearer_id]; | ||
489 | if (l_ptr) | ||
490 | tipc_link_reset(l_ptr); | ||
491 | tipc_node_unlock(n_ptr); | ||
492 | } | ||
493 | rcu_read_unlock(); | ||
494 | } | ||
495 | |||
496 | static void link_activate(struct tipc_link *link) | 478 | static void link_activate(struct tipc_link *link) |
497 | { | 479 | { |
498 | struct tipc_node *node = link->owner; | 480 | struct tipc_node *node = link->owner; |