aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/rculist.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/rculist.h')
-rw-r--r--include/linux/rculist.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/linux/rculist.h b/include/linux/rculist.h
index a18b16f1dc0e..17c6b1f84a77 100644
--- a/include/linux/rculist.h
+++ b/include/linux/rculist.h
@@ -29,8 +29,8 @@
29 */ 29 */
30static inline void INIT_LIST_HEAD_RCU(struct list_head *list) 30static inline void INIT_LIST_HEAD_RCU(struct list_head *list)
31{ 31{
32 ACCESS_ONCE(list->next) = list; 32 WRITE_ONCE(list->next, list);
33 ACCESS_ONCE(list->prev) = list; 33 WRITE_ONCE(list->prev, list);
34} 34}
35 35
36/* 36/*
@@ -288,7 +288,7 @@ static inline void list_splice_init_rcu(struct list_head *list,
288#define list_first_or_null_rcu(ptr, type, member) \ 288#define list_first_or_null_rcu(ptr, type, member) \
289({ \ 289({ \
290 struct list_head *__ptr = (ptr); \ 290 struct list_head *__ptr = (ptr); \
291 struct list_head *__next = ACCESS_ONCE(__ptr->next); \ 291 struct list_head *__next = READ_ONCE(__ptr->next); \
292 likely(__ptr != __next) ? list_entry_rcu(__next, type, member) : NULL; \ 292 likely(__ptr != __next) ? list_entry_rcu(__next, type, member) : NULL; \
293}) 293})
294 294
@@ -549,8 +549,8 @@ static inline void hlist_add_behind_rcu(struct hlist_node *n,
549 */ 549 */
550#define hlist_for_each_entry_from_rcu(pos, member) \ 550#define hlist_for_each_entry_from_rcu(pos, member) \
551 for (; pos; \ 551 for (; pos; \
552 pos = hlist_entry_safe(rcu_dereference((pos)->member.next),\ 552 pos = hlist_entry_safe(rcu_dereference_raw(hlist_next_rcu( \
553 typeof(*(pos)), member)) 553 &(pos)->member)), typeof(*(pos)), member))
554 554
555#endif /* __KERNEL__ */ 555#endif /* __KERNEL__ */
556#endif 556#endif