aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/tipc/node.c22
-rw-r--r--net/tipc/node.h8
2 files changed, 7 insertions, 23 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)
diff --git a/net/tipc/node.h b/net/tipc/node.h
index fd86726ed192..4bd5eff82ce0 100644
--- a/net/tipc/node.h
+++ b/net/tipc/node.h
@@ -49,16 +49,14 @@
49 49
50/* Flags used to block (re)establishment of contact with a neighboring node 50/* Flags used to block (re)establishment of contact with a neighboring node
51 * TIPC_NODE_DOWN: indicate node is down 51 * TIPC_NODE_DOWN: indicate node is down
52 * TIPC_NAMES_GONE: indicate the node's publications are purged
53 * TIPC_NODE_RESET: indicate node is reset 52 * TIPC_NODE_RESET: indicate node is reset
54 * TIPC_NODE_LOST: indicate node is lost and it's used to notify subscriptions 53 * TIPC_NODE_LOST: indicate node is lost and it's used to notify subscriptions
55 * when node lock is released 54 * when node lock is released
56 */ 55 */
57enum { 56enum {
58 TIPC_NODE_DOWN = (1 << 1), 57 TIPC_NODE_DOWN = (1 << 1),
59 TIPC_NAMES_GONE = (1 << 2), 58 TIPC_NODE_RESET = (1 << 2),
60 TIPC_NODE_RESET = (1 << 3), 59 TIPC_NODE_LOST = (1 << 3)
61 TIPC_NODE_LOST = (1 << 4)
62}; 60};
63 61
64/** 62/**
@@ -142,7 +140,7 @@ static inline void tipc_node_lock(struct tipc_node *node)
142 140
143static inline bool tipc_node_blocked(struct tipc_node *node) 141static inline bool tipc_node_blocked(struct tipc_node *node)
144{ 142{
145 return (node->flags & (TIPC_NODE_DOWN | TIPC_NAMES_GONE | 143 return (node->flags & (TIPC_NODE_DOWN | TIPC_NODE_LOST |
146 TIPC_NODE_RESET)); 144 TIPC_NODE_RESET));
147} 145}
148 146