aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/net.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/tipc/net.c')
-rw-r--r--net/tipc/net.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/tipc/net.c b/net/tipc/net.c
index a7f6964c3a4b..62199cf5a56c 100644
--- a/net/tipc/net.c
+++ b/net/tipc/net.c
@@ -123,15 +123,13 @@ void tipc_net_finalize(struct net *net, u32 addr)
123{ 123{
124 struct tipc_net *tn = tipc_net(net); 124 struct tipc_net *tn = tipc_net(net);
125 125
126 spin_lock_bh(&tn->node_list_lock); 126 if (!cmpxchg(&tn->node_addr, 0, addr)) {
127 if (!tipc_own_addr(net)) {
128 tipc_set_node_addr(net, addr); 127 tipc_set_node_addr(net, addr);
129 tipc_named_reinit(net); 128 tipc_named_reinit(net);
130 tipc_sk_reinit(net); 129 tipc_sk_reinit(net);
131 tipc_nametbl_publish(net, TIPC_CFG_SRV, addr, addr, 130 tipc_nametbl_publish(net, TIPC_CFG_SRV, addr, addr,
132 TIPC_CLUSTER_SCOPE, 0, addr); 131 TIPC_CLUSTER_SCOPE, 0, addr);
133 } 132 }
134 spin_unlock_bh(&tn->node_list_lock);
135} 133}
136 134
137void tipc_net_stop(struct net *net) 135void tipc_net_stop(struct net *net)