Code Review
/
kvmfornfv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git]
/
kernel
/
include
/
linux
/
rculist.h
diff --git
a/kernel/include/linux/rculist.h
b/kernel/include/linux/rculist.h
index
a18b16f
..
5ed5409
100644
(file)
--- a/
kernel/include/linux/rculist.h
+++ b/
kernel/include/linux/rculist.h
@@
-29,8
+29,8
@@
*/
static inline void INIT_LIST_HEAD_RCU(struct list_head *list)
{
*/
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)
;
}
/*
}
/*
@@
-247,10
+247,7
@@
static inline void list_splice_init_rcu(struct list_head *list,
* primitives such as list_add_rcu() as long as it's guarded by rcu_read_lock().
*/
#define list_entry_rcu(ptr, type, member) \
* primitives such as list_add_rcu() as long as it's guarded by rcu_read_lock().
*/
#define list_entry_rcu(ptr, type, member) \
-({ \
- typeof(*ptr) __rcu *__ptr = (typeof(*ptr) __rcu __force *)ptr; \
- container_of((typeof(ptr))rcu_dereference_raw(__ptr), type, member); \
-})
+ container_of(lockless_dereference(ptr), type, member)
/**
* Where are list_empty_rcu() and list_first_entry_rcu()?
/**
* Where are list_empty_rcu() and list_first_entry_rcu()?
@@
-288,7
+285,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); \
#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; \
})
likely(__ptr != __next) ? list_entry_rcu(__next, type, member) : NULL; \
})
@@
-549,8
+546,8
@@
static inline void hlist_add_behind_rcu(struct hlist_node *n,
*/
#define hlist_for_each_entry_from_rcu(pos, member) \
for (; pos; \
*/
#define hlist_for_each_entry_from_rcu(pos, member) \
for (; pos; \
- pos = hlist_entry_safe(rcu_dereference
((pos)->member.next),
\
- typeof(*(pos)), member))
+ pos = hlist_entry_safe(rcu_dereference
_raw(hlist_next_rcu(
\
+
&(pos)->member)),
typeof(*(pos)), member))
#endif /* __KERNEL__ */
#endif
#endif /* __KERNEL__ */
#endif