summaryrefslogtreecommitdiff
path: root/include/linux/rculist.h
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2015-03-04 01:57:58 +0300
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2015-05-27 22:56:15 +0300
commit7d0ae8086b828311250c6afdf800b568ac9bd693 (patch)
treea1bb0c6a5e66f1e48c4667fd247a41c4b9253fd2 /include/linux/rculist.h
parent030bbdbf4c833bc69f502eae58498bc5572db736 (diff)
downloadlinux-7d0ae8086b828311250c6afdf800b568ac9bd693.tar.xz
rcu: Convert ACCESS_ONCE() to READ_ONCE() and WRITE_ONCE()
This commit moves from the old ACCESS_ONCE() API to the new READ_ONCE() and WRITE_ONCE() APIs. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> [ paulmck: Updated to include kernel/torture.c as suggested by Jason Low. ]
Diffstat (limited to 'include/linux/rculist.h')
-rw-r--r--include/linux/rculist.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/rculist.h b/include/linux/rculist.h
index a18b16f1dc0e..665397247e82 100644
--- a/include/linux/rculist.h
+++ b/include/linux/rculist.h
@@ -29,8 +29,8 @@
*/
static inline void INIT_LIST_HEAD_RCU(struct list_head *list)
{
- ACCESS_ONCE(list->next) = list;
- ACCESS_ONCE(list->prev) = list;
+ WRITE_ONCE(list->next, list);
+ WRITE_ONCE(list->prev, list);
}
/*
@@ -288,7 +288,7 @@ static inline void list_splice_init_rcu(struct list_head *list,
#define list_first_or_null_rcu(ptr, type, member) \
({ \
struct list_head *__ptr = (ptr); \
- struct list_head *__next = ACCESS_ONCE(__ptr->next); \
+ struct list_head *__next = READ_ONCE(__ptr->next); \
likely(__ptr != __next) ? list_entry_rcu(__next, type, member) : NULL; \
})