tipc: Ensure congested links receive bearer status updates
authorAllan Stephens <allan.stephens@windriver.com>
Thu, 26 May 2011 17:59:17 +0000 (13:59 -0400)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Thu, 1 Sep 2011 15:16:37 +0000 (11:16 -0400)
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 <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
net/tipc/bearer.c

index e465a92a4f9ce2e8252f6ec274b7621a37d81f43..e2202de3d93e3cc8f1d836d1c51b430bfb28fd8f 100644 (file)
@@ -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);
        }