aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc
diff options
context:
space:
mode:
authorYing Xue <ying.xue@windriver.com>2014-05-07 20:54:40 -0400
committerDavid S. Miller <davem@davemloft.net>2014-05-09 01:41:01 -0400
commitca9cf06a0654fcf4b114a5a2d08723fc45d00317 (patch)
tree8f08a86ecd8fc2b4fd35dc0ddc5bcec40194b61b /net/tipc
parentaecb9bb89cbc08366c50a98d2d4751b381a6dc3b (diff)
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 'net/tipc')
-rw-r--r--net/tipc/link.c2
-rw-r--r--net/tipc/node.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/net/tipc/link.c b/net/tipc/link.c
index 26abb16e86ab..2140837fbab9 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -1853,7 +1853,7 @@ static void tipc_link_proto_rcv(struct tipc_link *l_ptr, struct sk_buff *buf)
1853 * peer has lost contact -- don't allow peer's links 1853 * peer has lost contact -- don't allow peer's links
1854 * to reactivate before we recognize loss & clean up 1854 * to reactivate before we recognize loss & clean up
1855 */ 1855 */
1856 l_ptr->owner->action_flags = TIPC_WAIT_OWN_LINKS_DOWN; 1856 l_ptr->owner->action_flags |= TIPC_WAIT_OWN_LINKS_DOWN;
1857 } 1857 }
1858 1858
1859 link_state_event(l_ptr, RESET_MSG); 1859 link_state_event(l_ptr, RESET_MSG);
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)
308 tipc_link_reset_fragments(l_ptr); 308 tipc_link_reset_fragments(l_ptr);
309 } 309 }
310 310
311 n_ptr->action_flags &= ~TIPC_WAIT_OWN_LINKS_DOWN;
312
311 /* Notify subscribers and prevent re-contact with node until 313 /* Notify subscribers and prevent re-contact with node until
312 * cleanup is done. 314 * cleanup is done.
313 */ 315 */
314 n_ptr->action_flags = TIPC_WAIT_PEER_LINKS_DOWN | 316 n_ptr->action_flags |= TIPC_WAIT_PEER_LINKS_DOWN |
315 TIPC_NOTIFY_NODE_DOWN; 317 TIPC_NOTIFY_NODE_DOWN;
316} 318}
317 319
318struct sk_buff *tipc_node_get_nodes(const void *req_tlv_area, int req_tlv_space) 320struct sk_buff *tipc_node_get_nodes(const void *req_tlv_area, int req_tlv_space)