aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/list.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/list.h')
-rw-r--r--include/linux/list.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/linux/list.h b/include/linux/list.h
index ef9594171062..cbbb96fcead9 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,
654 *(n->pprev) = n; 654 *(n->pprev) = n;
655} 655}
656 656
657static inline void hlist_add_after(struct hlist_node *n, 657static inline void hlist_add_behind(struct hlist_node *n,
658 struct hlist_node *next) 658 struct hlist_node *prev)
659{ 659{
660 next->next = n->next; 660 n->next = prev->next;
661 n->next = next; 661 prev->next = n;
662 next->pprev = &n->next; 662 n->pprev = &prev->next;
663 663
664 if(next->next) 664 if (n->next)
665 next->next->pprev = &next->next; 665 n->next->pprev = &n->next;
666} 666}
667 667
668/* after that we'll appear to be on some hlist and hlist_del will work */ 668/* after that we'll appear to be on some hlist and hlist_del will work */