aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/node.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/tipc/node.c')
-rw-r--r--net/tipc/node.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/net/tipc/node.c b/net/tipc/node.c
index d959343043fd..f7069299943f 100644
--- a/net/tipc/node.c
+++ b/net/tipc/node.c
@@ -474,8 +474,6 @@ int tipc_node_get_linkname(u32 bearer_id, u32 addr, char *linkname, size_t len)
474void tipc_node_unlock(struct tipc_node *node) 474void tipc_node_unlock(struct tipc_node *node)
475{ 475{
476 LIST_HEAD(nsub_list); 476 LIST_HEAD(nsub_list);
477 struct tipc_link *link;
478 int pkt_sz = 0;
479 u32 addr = 0; 477 u32 addr = 0;
480 478
481 if (likely(!node->action_flags)) { 479 if (likely(!node->action_flags)) {
@@ -488,18 +486,13 @@ void tipc_node_unlock(struct tipc_node *node)
488 node->action_flags &= ~TIPC_NOTIFY_NODE_DOWN; 486 node->action_flags &= ~TIPC_NOTIFY_NODE_DOWN;
489 } 487 }
490 if (node->action_flags & TIPC_NOTIFY_NODE_UP) { 488 if (node->action_flags & TIPC_NOTIFY_NODE_UP) {
491 link = node->active_links[0];
492 node->action_flags &= ~TIPC_NOTIFY_NODE_UP; 489 node->action_flags &= ~TIPC_NOTIFY_NODE_UP;
493 if (link) { 490 addr = node->addr;
494 pkt_sz = ((link->max_pkt - INT_H_SIZE) / ITEM_SIZE) *
495 ITEM_SIZE;
496 addr = node->addr;
497 }
498 } 491 }
499 spin_unlock_bh(&node->lock); 492 spin_unlock_bh(&node->lock);
500 493
501 if (!list_empty(&nsub_list)) 494 if (!list_empty(&nsub_list))
502 tipc_nodesub_notify(&nsub_list); 495 tipc_nodesub_notify(&nsub_list);
503 if (pkt_sz) 496 if (addr)
504 tipc_named_node_up(pkt_sz, addr); 497 tipc_named_node_up(addr);
505} 498}