aboutsummaryrefslogtreecommitdiffstats
path: root/net/xfrm/xfrm_policy.c
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/xfrm/xfrm_policy.c
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/xfrm/xfrm_policy.c')
-rw-r--r--net/xfrm/xfrm_policy.c4
1 files changed, 2 insertions, 2 deletions
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);