Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ca9cf06a authored by Ying Xue's avatar Ying Xue Committed by David S. Miller
Browse files

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: default avatarYing Xue <ying.xue@windriver.com>
Reviewed-by: default avatarJon Maloy <jon.maloy@ericsson.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent aecb9bb8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1853,7 +1853,7 @@ static void tipc_link_proto_rcv(struct tipc_link *l_ptr, struct sk_buff *buf)
			 * peer has lost contact -- don't allow peer's links
			 * to reactivate before we recognize loss & clean up
			 */
			l_ptr->owner->action_flags = TIPC_WAIT_OWN_LINKS_DOWN;
			l_ptr->owner->action_flags |= TIPC_WAIT_OWN_LINKS_DOWN;
		}

		link_state_event(l_ptr, RESET_MSG);
+4 −2
Original line number Diff line number Diff line
@@ -308,10 +308,12 @@ 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 |
	n_ptr->action_flags |= TIPC_WAIT_PEER_LINKS_DOWN |
			       TIPC_NOTIFY_NODE_DOWN;
}