aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/link.c
diff options
context:
space:
mode:
authorYing Xue <[email protected]>2014-05-05 00:56:11 +0000
committerDavid S. Miller <[email protected]>2014-05-05 21:26:44 +0000
commit10f465c4966fbc8f50a59480d37a3451f6f3d564 (patch)
treef94a16d100710b23ff3c3069a76bc942f32edc00 /net/tipc/link.c
parenttipc: adjust order of variables in tipc_node structure (diff)
downloadkernel-10f465c4966fbc8f50a59480d37a3451f6f3d564.tar.gz
kernel-10f465c4966fbc8f50a59480d37a3451f6f3d564.zip
tipc: rename setup_blocked variable of node struct to flags
Rename setup_blocked variable of node struct to a more common name called "flags", which will be used to represent kinds of node states. Signed-off-by: Ying Xue <[email protected]> Reviewed-by: Erik Hugne <[email protected]> Reviewed-by: Jon Maloy <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/tipc/link.c')
-rw-r--r--net/tipc/link.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/net/tipc/link.c b/net/tipc/link.c
index 3a801452643d..ac074aaf104d 100644
--- a/net/tipc/link.c
+++ b/net/tipc/link.c
@@ -1495,14 +1495,14 @@ void tipc_rcv(struct sk_buff *head, struct tipc_bearer *b_ptr)
goto unlock_discard;
/* Verify that communication with node is currently allowed */
- if ((n_ptr->block_setup & WAIT_PEER_DOWN) &&
- msg_user(msg) == LINK_PROTOCOL &&
- (msg_type(msg) == RESET_MSG ||
- msg_type(msg) == ACTIVATE_MSG) &&
- !msg_redundant_link(msg))
- n_ptr->block_setup &= ~WAIT_PEER_DOWN;
+ if ((n_ptr->flags & TIPC_NODE_DOWN) &&
+ msg_user(msg) == LINK_PROTOCOL &&
+ (msg_type(msg) == RESET_MSG ||
+ msg_type(msg) == ACTIVATE_MSG) &&
+ !msg_redundant_link(msg))
+ n_ptr->flags &= ~TIPC_NODE_DOWN;
- if (n_ptr->block_setup)
+ if (tipc_node_blocked(n_ptr))
goto unlock_discard;
/* Validate message sequence number info */
@@ -1744,7 +1744,7 @@ void tipc_link_proto_xmit(struct tipc_link *l_ptr, u32 msg_typ, int probe_msg,
return;
/* Abort non-RESET send if communication with node is prohibited */
- if ((l_ptr->owner->block_setup) && (msg_typ != RESET_MSG))
+ if ((tipc_node_blocked(l_ptr->owner)) && (msg_typ != RESET_MSG))
return;
/* Create protocol message with "out-of-sequence" sequence number */
@@ -1859,7 +1859,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->block_setup = WAIT_NODE_DOWN;
+ l_ptr->owner->flags = TIPC_NODE_RESET;
}
link_state_event(l_ptr, RESET_MSG);