aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/rculist.h
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 /include/linux/rculist.h
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 'include/linux/rculist.h')
-rw-r--r--include/linux/rculist.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/rculist.h b/include/linux/rculist.h
index 8183b46fbaa2..372ad5e0dcb8 100644
--- a/include/linux/rculist.h
+++ b/include/linux/rculist.h
@@ -432,9 +432,9 @@ static inline void hlist_add_before_rcu(struct hlist_node *n,
432} 432}
433 433
434/** 434/**
435 * hlist_add_after_rcu 435 * hlist_add_behind_rcu
436 * @prev: the existing element to add the new element after.
437 * @n: the new element to add to the hash list. 436 * @n: the new element to add to the hash list.
437 * @prev: the existing element to add the new element after.
438 * 438 *
439 * Description: 439 * Description:
440 * Adds the specified element to the specified hlist 440 * Adds the specified element to the specified hlist
@@ -449,8 +449,8 @@ static inline void hlist_add_before_rcu(struct hlist_node *n,
449 * hlist_for_each_entry_rcu(), used to prevent memory-consistency 449 * hlist_for_each_entry_rcu(), used to prevent memory-consistency
450 * problems on Alpha CPUs. 450 * problems on Alpha CPUs.
451 */ 451 */
452static inline void hlist_add_after_rcu(struct hlist_node *prev, 452static inline void hlist_add_behind_rcu(struct hlist_node *n,
453 struct hlist_node *n) 453 struct hlist_node *prev)
454{ 454{
455 n->next = prev->next; 455 n->next = prev->next;
456 n->pprev = &prev->next; 456 n->pprev = &prev->next;