aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/node_subscr.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-03-13 21:49:11 -0400
committerDavid S. Miller <davem@davemloft.net>2011-03-13 21:49:11 -0400
commit27b61ae2d73936554fcd07e77c3cc13bc88c41a9 (patch)
tree12f589c6a4671bf7f08045bb11059514f47bb924 /net/tipc/node_subscr.c
parent46af31800b6916c92fffa529dc3c357008da957d (diff)
parent633d2bdedc3b81f202bda8fdad17aeb08809b7df (diff)
Merge branch 'tipc-Mar13-2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/net-next-2.6
Diffstat (limited to 'net/tipc/node_subscr.c')
-rw-r--r--net/tipc/node_subscr.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/net/tipc/node_subscr.c b/net/tipc/node_subscr.c
index 018a55332d91..c3c2815ae630 100644
--- a/net/tipc/node_subscr.c
+++ b/net/tipc/node_subscr.c
@@ -2,7 +2,7 @@
2 * net/tipc/node_subscr.c: TIPC "node down" subscription handling 2 * net/tipc/node_subscr.c: TIPC "node down" subscription handling
3 * 3 *
4 * Copyright (c) 1995-2006, Ericsson AB 4 * Copyright (c) 1995-2006, Ericsson AB
5 * Copyright (c) 2005, Wind River Systems 5 * Copyright (c) 2005, 2010-2011, Wind River Systems
6 * All rights reserved. 6 * All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
@@ -76,3 +76,22 @@ void tipc_nodesub_unsubscribe(struct tipc_node_subscr *node_sub)
76 list_del_init(&node_sub->nodesub_list); 76 list_del_init(&node_sub->nodesub_list);
77 tipc_node_unlock(node_sub->node); 77 tipc_node_unlock(node_sub->node);
78} 78}
79
80/**
81 * tipc_nodesub_notify - notify subscribers that a node is unreachable
82 *
83 * Note: node is locked by caller
84 */
85
86void tipc_nodesub_notify(struct tipc_node *node)
87{
88 struct tipc_node_subscr *ns;
89
90 list_for_each_entry(ns, &node->nsub, nodesub_list) {
91 if (ns->handle_node_down) {
92 tipc_k_signal((Handler)ns->handle_node_down,
93 (unsigned long)ns->usr_handle);
94 ns->handle_node_down = NULL;
95 }
96 }
97}