Skip to content

Commit bc18dd3

Browse files
Ken Heliastorvalds
authored andcommitted
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 <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: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent d25d9fe commit bc18dd3

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

‎include/linux/list.h‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -654,15 +654,15 @@ static inline void hlist_add_before(struct hlist_node *n,
654654
*(n->pprev) = n;
655655
}
656656

657-
static inline void hlist_add_after(struct hlist_node *n,
658-
struct hlist_node *next)
657+
static inline void hlist_add_after(struct hlist_node *prev,
658+
struct hlist_node *n)
659659
{
660-
next->next = n->next;
661-
n->next = next;
662-
next->pprev = &n->next;
660+
n->next = prev->next;
661+
prev->next = n;
662+
n->pprev = &prev->next;
663663

664-
if(next->next)
665-
next->next->pprev = &next->next;
664+
if (n->next)
665+
n->next->pprev = &n->next;
666666
}
667667

668668
/* after that we'll appear to be on some hlist and hlist_del will work */

0 commit comments

Comments
 (0)