tipc: Minor correction to TIPC module unloading
authorAllan Stephens <allan.stephens@windriver.com>
Thu, 20 Oct 2011 13:48:05 +0000 (09:48 -0400)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Tue, 27 Dec 2011 16:33:45 +0000 (11:33 -0500)
Modifies TIPC's module unloading logic to switch itself into "single
node" mode before starting to terminate networking support. This helps
to ensure that no operations that require TIPC to be in "networking"
mode can initiate once unloading starts.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
net/tipc/net.c

index fafef6c3c0f65088dde6ca402ec74e19b2f15183..e13162fc61cf73e415ee6511ccf20e952166d5f8 100644 (file)
@@ -207,8 +207,8 @@ void tipc_net_stop(void)
        if (tipc_mode != TIPC_NET_MODE)
                return;
        write_lock_bh(&tipc_net_lock);
-       tipc_bearer_stop();
        tipc_mode = TIPC_NODE_MODE;
+       tipc_bearer_stop();
        tipc_bclink_stop();
        list_for_each_entry_safe(node, t_node, &tipc_node_list, list)
                tipc_node_delete(node);