24,7 → 24,7 |
|
static inline void INIT_LIST_HEAD(struct list_head *list) |
{ |
list->next = list; |
WRITE_ONCE(list->next, list); |
list->prev = list; |
} |
|
42,7 → 42,7 |
next->prev = new; |
new->next = next; |
new->prev = prev; |
prev->next = new; |
WRITE_ONCE(prev->next, new); |
} |
#else |
extern void __list_add(struct list_head *new, |
186,7 → 186,7 |
*/ |
static inline int list_empty(const struct list_head *head) |
{ |
return head->next == head; |
return READ_ONCE(head->next) == head; |
} |
|
/** |
608,7 → 608,7 |
|
static inline int hlist_empty(const struct hlist_head *h) |
{ |
return !h->first; |
return !READ_ONCE(h->first); |
} |
|
static inline void __hlist_del(struct hlist_node *n) |
642,7 → 642,7 |
n->next = first; |
if (first) |
first->pprev = &n->next; |
h->first = n; |
WRITE_ONCE(h->first, n); |
n->pprev = &h->first; |
} |
|
653,7 → 653,7 |
n->pprev = next->pprev; |
n->next = next; |
next->pprev = &n->next; |
*(n->pprev) = n; |
WRITE_ONCE(*(n->pprev), n); |
} |
|
static inline void hlist_add_behind(struct hlist_node *n, |
660,7 → 660,7 |
struct hlist_node *prev) |
{ |
n->next = prev->next; |
prev->next = n; |
WRITE_ONCE(prev->next, n); |
n->pprev = &prev->next; |
|
if (n->next) |