From: Ken Helias Date: Wed, 6 Aug 2014 23:09:14 +0000 (-0700) Subject: list: make hlist_add_after() argument names match hlist_add_after_rcu() X-Git-Tag: v3.17-rc1~94^2~64 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bc18dd335a161f9229ed3aaab88ce0706cbd9867;p=platform%2Fkernel%2Flinux-exynos.git 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: Ken Helias Cc: "Paul E. McKenney" Cc: Christoph Hellwig Cc: Hugh Dickins Cc: Jeff Kirsher Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/linux/list.h b/include/linux/list.h index ef95941..624ec7f 100644 --- a/include/linux/list.h +++ b/include/linux/list.h @@ -654,15 +654,15 @@ static inline void hlist_add_before(struct hlist_node *n, *(n->pprev) = n; } -static inline void hlist_add_after(struct hlist_node *n, - struct hlist_node *next) +static inline void hlist_add_after(struct hlist_node *prev, + struct hlist_node *n) { - next->next = n->next; - n->next = next; - next->pprev = &n->next; + n->next = prev->next; + prev->next = n; + n->pprev = &prev->next; - if(next->next) - next->next->pprev = &next->next; + if (n->next) + n->next->pprev = &n->next; } /* after that we'll appear to be on some hlist and hlist_del will work */