From: Allan Stephens Date: Thu, 26 May 2011 17:59:17 +0000 (-0400) Subject: tipc: Ensure congested links receive bearer status updates X-Git-Tag: next-20110921~57^2~4^2~11 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=4b3743ef2ca67e1f8ef7e9d4c551d6ba6ee85584;p=karo-tx-linux.git tipc: Ensure congested links receive bearer status updates Modifies code that disables a bearer to ensure that all of its links are deleted, not just its uncongested links. Similarly, modifies code that blocks a bearer to ensure that all of its links are reset, not just its uncongested links. Signed-off-by: Allan Stephens Signed-off-by: Paul Gortmaker --- diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c index e465a92a4f9c..e2202de3d93e 100644 --- a/net/tipc/bearer.c +++ b/net/tipc/bearer.c @@ -604,6 +604,7 @@ int tipc_block_bearer(const char *name) info("Blocking bearer <%s>\n", name); spin_lock_bh(&b_ptr->lock); b_ptr->blocked = 1; + list_splice_init(&b_ptr->cong_links, &b_ptr->links); list_for_each_entry_safe(l_ptr, temp_l_ptr, &b_ptr->links, link_list) { struct tipc_node *n_ptr = l_ptr->owner; @@ -631,6 +632,7 @@ static void bearer_disable(struct tipc_bearer *b_ptr) spin_lock_bh(&b_ptr->lock); b_ptr->blocked = 1; b_ptr->media->disable_bearer(b_ptr); + list_splice_init(&b_ptr->cong_links, &b_ptr->links); list_for_each_entry_safe(l_ptr, temp_l_ptr, &b_ptr->links, link_list) { tipc_link_delete(l_ptr); }