summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKen Helias <kenhelias@firemail.de>2014-08-06 23:09:16 (GMT)
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-07 01:01:24 (GMT)
commit1d023284c31a4e40a94d5bbcb7dbb7a35ee0bcbc (patch)
tree24b0b38fbd227873f771ebca55cba8b595bb6c57 /include
parentbc18dd335a161f9229ed3aaab88ce0706cbd9867 (diff)
downloadlinux-1d023284c31a4e40a94d5bbcb7dbb7a35ee0bcbc.tar.xz
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')
-rw-r--r--include/linux/list.h4
-rw-r--r--include/linux/rculist.h8
2 files changed, 6 insertions, 6 deletions
diff --git a/include/linux/list.h b/include/linux/list.h
index 624ec7f..cbbb96f 100644
--- a/include/linux/list.h
+++ b/include/linux/list.h
@@ -654,8 +654,8 @@ static inline void hlist_add_before(struct hlist_node *n,
*(n->pprev) = n;
}
-static inline void hlist_add_after(struct hlist_node *prev,
- struct hlist_node *n)
+static inline void hlist_add_behind(struct hlist_node *n,
+ struct hlist_node *prev)
{
n->next = prev->next;
prev->next = n;
diff --git a/include/linux/rculist.h b/include/linux/rculist.h
index 8183b46f..372ad5e 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,
}
/**
- * hlist_add_after_rcu
- * @prev: the existing element to add the new element after.
+ * hlist_add_behind_rcu
* @n: the new element to add to the hash list.
+ * @prev: the existing element to add the new element after.
*
* Description:
* Adds the specified element to the specified hlist
@@ -449,8 +449,8 @@ static inline void hlist_add_before_rcu(struct hlist_node *n,
* hlist_for_each_entry_rcu(), used to prevent memory-consistency
* problems on Alpha CPUs.
*/
-static inline void hlist_add_after_rcu(struct hlist_node *prev,
- struct hlist_node *n)
+static inline void hlist_add_behind_rcu(struct hlist_node *n,
+ struct hlist_node *prev)
{
n->next = prev->next;
n->pprev = &prev->next;