diff options
Diffstat (limited to 'net/tipc/node.c')
-rw-r--r-- | net/tipc/node.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/net/tipc/node.c b/net/tipc/node.c index 940851797615..b702c7bf580f 100644 --- a/net/tipc/node.c +++ b/net/tipc/node.c | |||
@@ -383,6 +383,20 @@ static void node_established_contact(struct tipc_node *n_ptr) | |||
383 | tipc_highest_allowed_slave); | 383 | tipc_highest_allowed_slave); |
384 | } | 384 | } |
385 | 385 | ||
386 | static void node_cleanup_finished(unsigned long node_addr) | ||
387 | { | ||
388 | struct tipc_node *n_ptr; | ||
389 | |||
390 | read_lock_bh(&tipc_net_lock); | ||
391 | n_ptr = tipc_node_find(node_addr); | ||
392 | if (n_ptr) { | ||
393 | tipc_node_lock(n_ptr); | ||
394 | n_ptr->cleanup_required = 0; | ||
395 | tipc_node_unlock(n_ptr); | ||
396 | } | ||
397 | read_unlock_bh(&tipc_net_lock); | ||
398 | } | ||
399 | |||
386 | static void node_lost_contact(struct tipc_node *n_ptr) | 400 | static void node_lost_contact(struct tipc_node *n_ptr) |
387 | { | 401 | { |
388 | struct cluster *c_ptr; | 402 | struct cluster *c_ptr; |
@@ -457,6 +471,11 @@ static void node_lost_contact(struct tipc_node *n_ptr) | |||
457 | tipc_k_signal((Handler)ns->handle_node_down, | 471 | tipc_k_signal((Handler)ns->handle_node_down, |
458 | (unsigned long)ns->usr_handle); | 472 | (unsigned long)ns->usr_handle); |
459 | } | 473 | } |
474 | |||
475 | /* Prevent re-contact with node until all cleanup is done */ | ||
476 | |||
477 | n_ptr->cleanup_required = 1; | ||
478 | tipc_k_signal((Handler)node_cleanup_finished, n_ptr->addr); | ||
460 | } | 479 | } |
461 | 480 | ||
462 | /** | 481 | /** |