diff options
author | Ying Xue <ying.xue@windriver.com> | 2014-05-07 20:54:39 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-05-09 01:41:01 -0400 |
commit | aecb9bb89cbc08366c50a98d2d4751b381a6dc3b (patch) | |
tree | d7290c509698b82d49ae68ccb292d32dd2ce5bbb /net/tipc/node.c | |
parent | 1b5d35358effb776b1ef47b26ec0df54af79d842 (diff) |
tipc: rename enum names of node flags
Rename node flags to action_flags as well as its enum names so
that they can reflect its real meanings.
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/node.c')
-rw-r--r-- | net/tipc/node.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/net/tipc/node.c b/net/tipc/node.c index 74efebc1cb7a..bb66a268b139 100644 --- a/net/tipc/node.c +++ b/net/tipc/node.c | |||
@@ -108,7 +108,7 @@ struct tipc_node *tipc_node_create(u32 addr) | |||
108 | break; | 108 | break; |
109 | } | 109 | } |
110 | list_add_tail_rcu(&n_ptr->list, &temp_node->list); | 110 | list_add_tail_rcu(&n_ptr->list, &temp_node->list); |
111 | n_ptr->flags = TIPC_NODE_DOWN; | 111 | n_ptr->action_flags = TIPC_WAIT_PEER_LINKS_DOWN; |
112 | n_ptr->signature = INVALID_NODE_SIG; | 112 | n_ptr->signature = INVALID_NODE_SIG; |
113 | 113 | ||
114 | tipc_num_nodes++; | 114 | tipc_num_nodes++; |
@@ -267,7 +267,7 @@ void tipc_node_detach_link(struct tipc_node *n_ptr, struct tipc_link *l_ptr) | |||
267 | 267 | ||
268 | static void node_established_contact(struct tipc_node *n_ptr) | 268 | static void node_established_contact(struct tipc_node *n_ptr) |
269 | { | 269 | { |
270 | n_ptr->flags |= TIPC_NODE_UP; | 270 | n_ptr->action_flags |= TIPC_NOTIFY_NODE_UP; |
271 | n_ptr->bclink.oos_state = 0; | 271 | n_ptr->bclink.oos_state = 0; |
272 | n_ptr->bclink.acked = tipc_bclink_get_last_sent(); | 272 | n_ptr->bclink.acked = tipc_bclink_get_last_sent(); |
273 | tipc_bclink_add_node(n_ptr->addr); | 273 | tipc_bclink_add_node(n_ptr->addr); |
@@ -311,7 +311,8 @@ static void node_lost_contact(struct tipc_node *n_ptr) | |||
311 | /* Notify subscribers and prevent re-contact with node until | 311 | /* Notify subscribers and prevent re-contact with node until |
312 | * cleanup is done. | 312 | * cleanup is done. |
313 | */ | 313 | */ |
314 | n_ptr->flags = TIPC_NODE_DOWN | TIPC_NODE_LOST; | 314 | n_ptr->action_flags = TIPC_WAIT_PEER_LINKS_DOWN | |
315 | TIPC_NOTIFY_NODE_DOWN; | ||
315 | } | 316 | } |
316 | 317 | ||
317 | struct sk_buff *tipc_node_get_nodes(const void *req_tlv_area, int req_tlv_space) | 318 | struct sk_buff *tipc_node_get_nodes(const void *req_tlv_area, int req_tlv_space) |
@@ -459,18 +460,18 @@ void tipc_node_unlock(struct tipc_node *node) | |||
459 | int pkt_sz = 0; | 460 | int pkt_sz = 0; |
460 | u32 addr = 0; | 461 | u32 addr = 0; |
461 | 462 | ||
462 | if (likely(!node->flags)) { | 463 | if (likely(!node->action_flags)) { |
463 | spin_unlock_bh(&node->lock); | 464 | spin_unlock_bh(&node->lock); |
464 | return; | 465 | return; |
465 | } | 466 | } |
466 | 467 | ||
467 | if (node->flags & TIPC_NODE_LOST) { | 468 | if (node->action_flags & TIPC_NOTIFY_NODE_DOWN) { |
468 | list_replace_init(&node->nsub, &nsub_list); | 469 | list_replace_init(&node->nsub, &nsub_list); |
469 | node->flags &= ~TIPC_NODE_LOST; | 470 | node->action_flags &= ~TIPC_NOTIFY_NODE_DOWN; |
470 | } | 471 | } |
471 | if (node->flags & TIPC_NODE_UP) { | 472 | if (node->action_flags & TIPC_NOTIFY_NODE_UP) { |
472 | link = node->active_links[0]; | 473 | link = node->active_links[0]; |
473 | node->flags &= ~TIPC_NODE_UP; | 474 | node->action_flags &= ~TIPC_NOTIFY_NODE_UP; |
474 | if (link) { | 475 | if (link) { |
475 | pkt_sz = ((link->max_pkt - INT_H_SIZE) / ITEM_SIZE) * | 476 | pkt_sz = ((link->max_pkt - INT_H_SIZE) / ITEM_SIZE) * |
476 | ITEM_SIZE; | 477 | ITEM_SIZE; |