Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mpe/linux
[firefly-linux-kernel-4.4.55.git] / include / linux / list.h
index ef959417106222d475fbc01c419cf42db05dcca6..f33f831eb3c801925eed9f8d3333c65df8c57d08 100644 (file)
@@ -5,6 +5,7 @@
 #include <linux/stddef.h>
 #include <linux/poison.h>
 #include <linux/const.h>
+#include <linux/kernel.h>
 
 /*
  * Simple doubly linked list implementation.
@@ -654,15 +655,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_behind(struct hlist_node *n,
+                                   struct hlist_node *prev)
 {
-       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 */