aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorKen Helias <kenhelias@firemail.de>2014-08-06 19:09:16 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-06 21:01:24 -0400
commit1d023284c31a4e40a94d5bbcb7dbb7a35ee0bcbc (patch)
tree24b0b38fbd227873f771ebca55cba8b595bb6c57 /net
parentbc18dd335a161f9229ed3aaab88ce0706cbd9867 (diff)
list: fix order of arguments for hlist_add_after(_rcu)
All other add functions for lists have the new item as first argument and the position where it is added as second argument. This was changed for no good reason in this function and makes using it unnecessary confusing. The name was changed to hlist_add_behind() to cause unconverted code to generate a compile error instead of using the wrong parameter order. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Ken Helias <kenhelias@firemail.de> Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> [intel driver bits] Cc: Hugh Dickins <hughd@google.com> Cc: Christoph Hellwig <hch@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'net')
-rw-r--r--net/batman-adv/fragmentation.c2
-rw-r--r--net/bridge/br_multicast.c2
-rw-r--r--net/ipv4/fib_trie.c2
-rw-r--r--net/ipv6/addrlabel.c2
-rw-r--r--net/xfrm/xfrm_policy.c4
5 files changed, 6 insertions, 6 deletions
diff --git a/net/batman-adv/fragmentation.c b/net/batman-adv/fragmentation.c
index 022d18ab27a6..52c43f904220 100644
--- a/net/batman-adv/fragmentation.c
+++ b/net/batman-adv/fragmentation.c
@@ -188,7 +188,7 @@ static bool batadv_frag_insert_packet(struct batadv_orig_node *orig_node,
188 188
189 /* Reached the end of the list, so insert after 'frag_entry_last'. */ 189 /* Reached the end of the list, so insert after 'frag_entry_last'. */
190 if (likely(frag_entry_last)) { 190 if (likely(frag_entry_last)) {
191 hlist_add_after(&frag_entry_last->list, &frag_entry_new->list); 191 hlist_add_behind(&frag_entry_last->list, &frag_entry_new->list);
192 chain->size += skb->len - hdr_size; 192 chain->size += skb->len - hdr_size;
193 chain->timestamp = jiffies; 193 chain->timestamp = jiffies;
194 ret = true; 194 ret = true;
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index b4845f4b2bb4..7751c92c8c57 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -1174,7 +1174,7 @@ static void br_multicast_add_router(struct net_bridge *br,
1174 } 1174 }
1175 1175
1176 if (slot) 1176 if (slot)
1177 hlist_add_after_rcu(slot, &port->rlist); 1177 hlist_add_behind_rcu(&port->rlist, slot);
1178 else 1178 else
1179 hlist_add_head_rcu(&port->rlist, &br->router_list); 1179 hlist_add_head_rcu(&port->rlist, &br->router_list);
1180} 1180}
diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c
index 5afeb5aa4c7c..e9cb2588e416 100644
--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
@@ -940,7 +940,7 @@ static void insert_leaf_info(struct hlist_head *head, struct leaf_info *new)
940 last = li; 940 last = li;
941 } 941 }
942 if (last) 942 if (last)
943 hlist_add_after_rcu(&last->hlist, &new->hlist); 943 hlist_add_behind_rcu(&new->hlist, &last->hlist);
944 else 944 else
945 hlist_add_before_rcu(&new->hlist, &li->hlist); 945 hlist_add_before_rcu(&new->hlist, &li->hlist);
946 } 946 }
diff --git a/net/ipv6/addrlabel.c b/net/ipv6/addrlabel.c
index 731e1e1722d9..fd0dc47f471d 100644
--- a/net/ipv6/addrlabel.c
+++ b/net/ipv6/addrlabel.c
@@ -277,7 +277,7 @@ static int __ip6addrlbl_add(struct ip6addrlbl_entry *newp, int replace)
277 last = p; 277 last = p;
278 } 278 }
279 if (last) 279 if (last)
280 hlist_add_after_rcu(&last->list, &newp->list); 280 hlist_add_behind_rcu(&newp->list, &last->list);
281 else 281 else
282 hlist_add_head_rcu(&newp->list, &ip6addrlbl_table.head); 282 hlist_add_head_rcu(&newp->list, &ip6addrlbl_table.head);
283out: 283out:
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index 0525d78ba328..beeed602aeb3 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -389,7 +389,7 @@ redo:
389 if (h != h0) 389 if (h != h0)
390 continue; 390 continue;
391 hlist_del(&pol->bydst); 391 hlist_del(&pol->bydst);
392 hlist_add_after(entry0, &pol->bydst); 392 hlist_add_behind(&pol->bydst, entry0);
393 } 393 }
394 entry0 = &pol->bydst; 394 entry0 = &pol->bydst;
395 } 395 }
@@ -654,7 +654,7 @@ int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl)
654 break; 654 break;
655 } 655 }
656 if (newpos) 656 if (newpos)
657 hlist_add_after(newpos, &policy->bydst); 657 hlist_add_behind(&policy->bydst, newpos);
658 else 658 else
659 hlist_add_head(&policy->bydst, chain); 659 hlist_add_head(&policy->bydst, chain);
660 xfrm_pol_hold(policy); 660 xfrm_pol_hold(policy);