]> nv-tegra.nvidia Code Review - linux-2.6.git/blobdiff - net/tipc/name_distr.c
tipc: cosmetic - function names are not to be full sentences
[linux-2.6.git] / net / tipc / name_distr.c
index 1d4a18aa9cccd8fe68f3f081008ce972952492f4..c9fa6dfcf28756d5afe958c2a25fd0a7901a255a 100644 (file)
@@ -109,11 +109,9 @@ static void named_cluster_distribute(struct sk_buff *buf)
 {
        struct sk_buff *buf_copy;
        struct tipc_node *n_ptr;
-       u32 n_num;
 
-       for (n_num = 1; n_num <= tipc_net.highest_node; n_num++) {
-               n_ptr = tipc_net.nodes[n_num];
-               if (n_ptr && tipc_node_has_active_links(n_ptr)) {
+       list_for_each_entry(n_ptr, &tipc_node_list, list) {
+               if (tipc_node_active_links(n_ptr)) {
                        buf_copy = skb_copy(buf, GFP_ATOMIC);
                        if (!buf_copy)
                                break;
@@ -214,7 +212,7 @@ exit:
 }
 
 /**
- * node_is_down - remove publication associated with a failed node
+ * named_purge_publ - remove publication associated with a failed node
  *
  * Invoked for each publication issued by a newly failed node.
  * Removes publication structure from name table & deletes it.
@@ -223,7 +221,7 @@ exit:
  * publication. Nudge this item's key to distinguish it from the other.
  */
 
-static void node_is_down(struct publication *publ)
+static void named_purge_publ(struct publication *publ)
 {
        struct publication *p;
 
@@ -269,7 +267,8 @@ void tipc_named_recv(struct sk_buff *buf)
                                tipc_nodesub_subscribe(&publ->subscr,
                                                       msg_orignode(msg),
                                                       publ,
-                                                      (net_ev_handler)node_is_down);
+                                                      (net_ev_handler)
+                                                      named_purge_publ);
                        }
                } else if (msg_type(msg) == WITHDRAWAL) {
                        publ = tipc_nametbl_remove_publ(ntohl(item->type),