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.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/list.h b/include/linux/list.h
index 3e3e64a61002..993395a2e55c 100644
--- a/include/linux/list.h
+++ b/include/linux/list.h
@@ -87,7 +87,7 @@ static inline void list_add_tail(struct list_head *new, struct list_head *head)
87static inline void __list_del(struct list_head * prev, struct list_head * next) 87static inline void __list_del(struct list_head * prev, struct list_head * next)
88{ 88{
89 next->prev = prev; 89 next->prev = prev;
90 prev->next = next; 90 WRITE_ONCE(prev->next, next);
91} 91}
92 92
93/** 93/**
@@ -615,7 +615,8 @@ static inline void __hlist_del(struct hlist_node *n)
615{ 615{
616 struct hlist_node *next = n->next; 616 struct hlist_node *next = n->next;
617 struct hlist_node **pprev = n->pprev; 617 struct hlist_node **pprev = n->pprev;
618 *pprev = next; 618
619 WRITE_ONCE(*pprev, next);
619 if (next) 620 if (next)
620 next->pprev = pprev; 621 next->pprev = pprev;
621} 622}