tipc: eliminate delayed link deletion at link failover
[cascardo/linux.git] / net / tipc / node.c
index 3e4f048..f3d522c 100644 (file)
@@ -394,18 +394,17 @@ static void node_lost_contact(struct tipc_node *n_ptr)
                n_ptr->bclink.recv_permitted = false;
        }
 
-       /* Abort link changeover */
+       /* Abort any ongoing link failover */
        for (i = 0; i < MAX_BEARERS; i++) {
                struct tipc_link *l_ptr = n_ptr->links[i];
                if (!l_ptr)
                        continue;
-               l_ptr->reset_checkpoint = l_ptr->next_in_no;
-               l_ptr->exp_msg_count = 0;
+               l_ptr->flags &= ~LINK_FAILINGOVER;
+               l_ptr->failover_checkpt = 0;
+               l_ptr->failover_pkts = 0;
+               kfree_skb(l_ptr->failover_skb);
+               l_ptr->failover_skb = NULL;
                tipc_link_reset_fragments(l_ptr);
-
-               /* Link marked for deletion after failover? => do it now */
-               if (l_ptr->flags & LINK_STOPPED)
-                       tipc_link_delete(l_ptr);
        }
 
        n_ptr->action_flags &= ~TIPC_WAIT_OWN_LINKS_DOWN;