diff options
Diffstat (limited to 'net/tipc/node.c')
-rw-r--r-- | net/tipc/node.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/net/tipc/node.c b/net/tipc/node.c index d21db204e25a..6e6c434872e8 100644 --- a/net/tipc/node.c +++ b/net/tipc/node.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * net/tipc/node.c: TIPC node management routines | 2 | * net/tipc/node.c: TIPC node management routines |
3 | * | 3 | * |
4 | * Copyright (c) 2000-2006, Ericsson AB | 4 | * Copyright (c) 2000-2006, 2012 Ericsson AB |
5 | * Copyright (c) 2005-2006, 2010-2011, Wind River Systems | 5 | * Copyright (c) 2005-2006, 2010-2011, Wind River Systems |
6 | * All rights reserved. | 6 | * All rights reserved. |
7 | * | 7 | * |
@@ -69,12 +69,11 @@ static unsigned int tipc_hashfn(u32 addr) | |||
69 | struct tipc_node *tipc_node_find(u32 addr) | 69 | struct tipc_node *tipc_node_find(u32 addr) |
70 | { | 70 | { |
71 | struct tipc_node *node; | 71 | struct tipc_node *node; |
72 | struct hlist_node *pos; | ||
73 | 72 | ||
74 | if (unlikely(!in_own_cluster_exact(addr))) | 73 | if (unlikely(!in_own_cluster_exact(addr))) |
75 | return NULL; | 74 | return NULL; |
76 | 75 | ||
77 | hlist_for_each_entry(node, pos, &node_htable[tipc_hashfn(addr)], hash) { | 76 | hlist_for_each_entry(node, &node_htable[tipc_hashfn(addr)], hash) { |
78 | if (node->addr == addr) | 77 | if (node->addr == addr) |
79 | return node; | 78 | return node; |
80 | } | 79 | } |
@@ -263,12 +262,9 @@ void tipc_node_detach_link(struct tipc_node *n_ptr, struct tipc_link *l_ptr) | |||
263 | static void node_established_contact(struct tipc_node *n_ptr) | 262 | static void node_established_contact(struct tipc_node *n_ptr) |
264 | { | 263 | { |
265 | tipc_k_signal((Handler)tipc_named_node_up, n_ptr->addr); | 264 | tipc_k_signal((Handler)tipc_named_node_up, n_ptr->addr); |
266 | 265 | n_ptr->bclink.oos_state = 0; | |
267 | if (n_ptr->bclink.supportable) { | 266 | n_ptr->bclink.acked = tipc_bclink_get_last_sent(); |
268 | n_ptr->bclink.acked = tipc_bclink_get_last_sent(); | 267 | tipc_bclink_add_node(n_ptr->addr); |
269 | tipc_bclink_add_node(n_ptr->addr); | ||
270 | n_ptr->bclink.supported = 1; | ||
271 | } | ||
272 | } | 268 | } |
273 | 269 | ||
274 | static void node_name_purge_complete(unsigned long node_addr) | 270 | static void node_name_purge_complete(unsigned long node_addr) |
@@ -294,7 +290,7 @@ static void node_lost_contact(struct tipc_node *n_ptr) | |||
294 | tipc_addr_string_fill(addr_string, n_ptr->addr)); | 290 | tipc_addr_string_fill(addr_string, n_ptr->addr)); |
295 | 291 | ||
296 | /* Flush broadcast link info associated with lost node */ | 292 | /* Flush broadcast link info associated with lost node */ |
297 | if (n_ptr->bclink.supported) { | 293 | if (n_ptr->bclink.recv_permitted) { |
298 | while (n_ptr->bclink.deferred_head) { | 294 | while (n_ptr->bclink.deferred_head) { |
299 | struct sk_buff *buf = n_ptr->bclink.deferred_head; | 295 | struct sk_buff *buf = n_ptr->bclink.deferred_head; |
300 | n_ptr->bclink.deferred_head = buf->next; | 296 | n_ptr->bclink.deferred_head = buf->next; |
@@ -310,7 +306,7 @@ static void node_lost_contact(struct tipc_node *n_ptr) | |||
310 | tipc_bclink_remove_node(n_ptr->addr); | 306 | tipc_bclink_remove_node(n_ptr->addr); |
311 | tipc_bclink_acknowledge(n_ptr, INVALID_LINK_SEQ); | 307 | tipc_bclink_acknowledge(n_ptr, INVALID_LINK_SEQ); |
312 | 308 | ||
313 | n_ptr->bclink.supported = 0; | 309 | n_ptr->bclink.recv_permitted = false; |
314 | } | 310 | } |
315 | 311 | ||
316 | /* Abort link changeover */ | 312 | /* Abort link changeover */ |