Commit bc18dd33 authored by Ken Helias's avatar Ken Helias Committed by Linus Torvalds

list: make hlist_add_after() argument names match hlist_add_after_rcu()

The argument names for hlist_add_after() are poorly chosen because they
look the same as the ones for hlist_add_before() but have to be used
differently.

hlist_add_after_rcu() has made a better choice.
Signed-off-by: default avatarKen Helias <kenhelias@firemail.de>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Hugh Dickins <hughd@google.com>
Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent d25d9fec
...@@ -654,15 +654,15 @@ static inline void hlist_add_before(struct hlist_node *n, ...@@ -654,15 +654,15 @@ static inline void hlist_add_before(struct hlist_node *n,
*(n->pprev) = n; *(n->pprev) = n;
} }
static inline void hlist_add_after(struct hlist_node *n, static inline void hlist_add_after(struct hlist_node *prev,
struct hlist_node *next) struct hlist_node *n)
{ {
next->next = n->next; n->next = prev->next;
n->next = next; prev->next = n;
next->pprev = &n->next; n->pprev = &prev->next;
if(next->next) if (n->next)
next->next->pprev = &next->next; n->next->pprev = &n->next;
} }
/* after that we'll appear to be on some hlist and hlist_del will work */ /* after that we'll appear to be on some hlist and hlist_del will work */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment