aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/node.c
diff options
context:
space:
mode:
authorYing Xue <ying.xue@windriver.com>2014-05-04 20:56:13 -0400
committerDavid S. Miller <davem@davemloft.net>2014-05-05 17:26:44 -0400
commit9d561949685749be3d97239eab7d85aa78718108 (patch)
treee82cd8f0140c9482e3b2e408e18afc6d12fd240a /net/tipc/node.c
parent9db9fdd1983eb960182d72f95d77b91b3a5173d0 (diff)
tipc: remove TIPC_NAMES_GONE node flag
Since previously what all publications pertaining to the lost node were removed from name table was finished in tasklet context asynchronously, we need to TIPC_NAMES_GONE flag indicating whether the node cleanup work is finished or not. But now as the cleanup work has been finished when node lock is released, the flag becomes meaningless for us. Signed-off-by: Ying Xue <ying.xue@windriver.com> Reviewed-by: Erik Hugne <erik.hugne@ericsson.com> Reviewed-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/node.c')
-rw-r--r--net/tipc/node.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/net/tipc/node.c b/net/tipc/node.c
index befbcc9eade6..c3a36bba9952 100644
--- a/net/tipc/node.c
+++ b/net/tipc/node.c
@@ -273,18 +273,6 @@ static void node_established_contact(struct tipc_node *n_ptr)
273 tipc_bclink_add_node(n_ptr->addr); 273 tipc_bclink_add_node(n_ptr->addr);
274} 274}
275 275
276static void node_name_purge_complete(unsigned long node_addr)
277{
278 struct tipc_node *n_ptr;
279
280 n_ptr = tipc_node_find(node_addr);
281 if (n_ptr) {
282 tipc_node_lock(n_ptr);
283 n_ptr->flags &= ~TIPC_NAMES_GONE;
284 tipc_node_unlock(n_ptr);
285 }
286}
287
288static void node_lost_contact(struct tipc_node *n_ptr) 276static void node_lost_contact(struct tipc_node *n_ptr)
289{ 277{
290 char addr_string[16]; 278 char addr_string[16];
@@ -320,12 +308,10 @@ static void node_lost_contact(struct tipc_node *n_ptr)
320 tipc_link_reset_fragments(l_ptr); 308 tipc_link_reset_fragments(l_ptr);
321 } 309 }
322 310
323 /* Notify subscribers */ 311 /* Notify subscribers and prevent re-contact with node until
324 n_ptr->flags = TIPC_NODE_LOST; 312 * cleanup is done.
325 313 */
326 /* Prevent re-contact with node until cleanup is done */ 314 n_ptr->flags = TIPC_NODE_DOWN | TIPC_NODE_LOST;
327 n_ptr->flags |= TIPC_NODE_DOWN | TIPC_NAMES_GONE;
328 tipc_k_signal((Handler)node_name_purge_complete, n_ptr->addr);
329} 315}
330 316
331struct sk_buff *tipc_node_get_nodes(const void *req_tlv_area, int req_tlv_space) 317struct sk_buff *tipc_node_get_nodes(const void *req_tlv_area, int req_tlv_space)