aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/node.c
diff options
context:
space:
mode:
authorYing Xue <ying.xue@windriver.com>2014-05-08 08:54:40 +0800
committerDavid S. Miller <davem@davemloft.net>2014-05-09 01:41:01 -0400
commitca9cf06a0654fcf4b114a5a2d08723fc45d00317 (patch)
tree8f08a86ecd8fc2b4fd35dc0ddc5bcec40194b61b /net/tipc/node.c
parenttipc: rename enum names of node flags (diff)
downloadlinux-dev-ca9cf06a0654fcf4b114a5a2d08723fc45d00317.tar.xz
linux-dev-ca9cf06a0654fcf4b114a5a2d08723fc45d00317.zip
tipc: don't directly overwrite node action_flags
Each node action flag should be set or cleared separately, instead we now set the whole flags variable in one shot, and it's turned out to be hard to see which other flags are affected. Therefore, for instance, we explicitly clear TIPC_WAIT_OWN_LINKS_DOWN bit in node_lost_contact(). Signed-off-by: Ying Xue <ying.xue@windriver.com> Reviewed-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--net/tipc/node.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/tipc/node.c b/net/tipc/node.c
index bb66a268b139..facd5611e785 100644
--- a/net/tipc/node.c
+++ b/net/tipc/node.c
@@ -308,11 +308,13 @@ static void node_lost_contact(struct tipc_node *n_ptr)
tipc_link_reset_fragments(l_ptr);
}
+ n_ptr->action_flags &= ~TIPC_WAIT_OWN_LINKS_DOWN;
+
/* Notify subscribers and prevent re-contact with node until
* cleanup is done.
*/
- n_ptr->action_flags = TIPC_WAIT_PEER_LINKS_DOWN |
- TIPC_NOTIFY_NODE_DOWN;
+ n_ptr->action_flags |= TIPC_WAIT_PEER_LINKS_DOWN |
+ TIPC_NOTIFY_NODE_DOWN;
}
struct sk_buff *tipc_node_get_nodes(const void *req_tlv_area, int req_tlv_space)