Lines Matching refs:next

37 	WRITE_ONCE(list->next, list);  in INIT_LIST_HEAD()
55 struct list_head *next);
67 struct list_head *next) in __list_add_valid() argument
83 if (likely(next->prev == prev && prev->next == next && new != prev && new != next)) in __list_add_valid()
88 ret &= __list_add_valid_or_report(new, prev, next); in __list_add_valid()
112 struct list_head *next = entry->next; in __list_del_entry_valid() local
119 if (likely(prev->next == entry && next->prev == entry)) in __list_del_entry_valid()
130 struct list_head *next) in __list_add_valid() argument
148 struct list_head *next) in __list_add() argument
150 if (!__list_add_valid(new, prev, next)) in __list_add()
153 next->prev = new; in __list_add()
154 new->next = next; in __list_add()
156 WRITE_ONCE(prev->next, new); in __list_add()
169 __list_add(new, head, head->next); in list_add()
193 static inline void __list_del(struct list_head * prev, struct list_head * next) in __list_del() argument
195 next->prev = prev; in __list_del()
196 WRITE_ONCE(prev->next, next); in __list_del()
209 __list_del(entry->prev, entry->next); in __list_del_clearprev()
218 __list_del(entry->prev, entry->next); in __list_del_entry()
230 entry->next = LIST_POISON1; in list_del()
244 new->next = old->next; in list_replace()
245 new->next->prev = new; in list_replace()
247 new->prev->next = new; in list_replace()
327 first->prev->next = last->next; in list_bulk_move_tail()
328 last->next->prev = first->prev; in list_bulk_move_tail()
330 head->prev->next = first; in list_bulk_move_tail()
333 last->next = head; in list_bulk_move_tail()
354 return list->next == head; in list_is_last()
373 return READ_ONCE(head->next) == head; in list_empty()
391 smp_store_release(&entry->next, entry); in list_del_init_careful()
409 struct list_head *next = smp_load_acquire(&head->next); in list_empty_careful() local
410 return list_is_head(next, head) && (next == READ_ONCE(head->prev)); in list_empty_careful()
422 first = head->next; in list_rotate_left()
451 return !list_empty(head) && (head->next == head->prev); in list_is_singular()
457 struct list_head *new_first = entry->next; in __list_cut_position()
458 list->next = head->next; in __list_cut_position()
459 list->next->prev = list; in __list_cut_position()
461 entry->next = list; in __list_cut_position()
462 head->next = new_first; in __list_cut_position()
485 if (list_is_singular(head) && !list_is_head(entry, head) && (entry != head->next)) in list_cut_position()
511 if (head->next == entry) { in list_cut_before()
515 list->next = head->next; in list_cut_before()
516 list->next->prev = list; in list_cut_before()
518 list->prev->next = list; in list_cut_before()
519 head->next = entry; in list_cut_before()
525 struct list_head *next) in __list_splice() argument
527 struct list_head *first = list->next; in __list_splice()
531 prev->next = first; in __list_splice()
533 last->next = next; in __list_splice()
534 next->prev = last; in __list_splice()
546 __list_splice(list, head, head->next); in list_splice()
572 __list_splice(list, head, head->next); in list_splice_init()
612 list_entry((ptr)->next, type, member)
635 struct list_head *pos__ = READ_ONCE(head__->next); \
645 list_entry((pos)->member.next, typeof(*(pos)), member)
687 for (pos = (head)->next; !list_is_head(pos, (head)); pos = pos->next)
695 for (pos = rcu_dereference((head)->next); \
697 pos = rcu_dereference(pos->next))
707 for (pos = pos->next; !list_is_head(pos, (head)); pos = pos->next)
724 for (pos = (head)->next, n = pos->next; \
726 pos = n, n = pos->next)
936 h->next = NULL; in INIT_HLIST_NODE()
977 struct hlist_node *next = n->next; in __hlist_del() local
980 WRITE_ONCE(*pprev, next); in __hlist_del()
981 if (next) in __hlist_del()
982 WRITE_ONCE(next->pprev, pprev); in __hlist_del()
995 n->next = LIST_POISON1; in hlist_del()
1024 WRITE_ONCE(n->next, first); in hlist_add_head()
1026 WRITE_ONCE(first->pprev, &n->next); in hlist_add_head()
1037 struct hlist_node *next) in hlist_add_before() argument
1039 WRITE_ONCE(n->pprev, next->pprev); in hlist_add_before()
1040 WRITE_ONCE(n->next, next); in hlist_add_before()
1041 WRITE_ONCE(next->pprev, &n->next); in hlist_add_before()
1053 WRITE_ONCE(n->next, prev->next); in hlist_add_behind()
1054 WRITE_ONCE(prev->next, n); in hlist_add_behind()
1055 WRITE_ONCE(n->pprev, &prev->next); in hlist_add_behind()
1057 if (n->next) in hlist_add_behind()
1058 WRITE_ONCE(n->next->pprev, &n->next); in hlist_add_behind()
1071 n->pprev = &n->next; in hlist_add_fake()
1080 return h->pprev == &h->next; in hlist_fake()
1094 return !n->next && n->pprev == &h->first; in hlist_is_singular_node()
1117 for (pos = (head)->first; pos ; pos = pos->next)
1120 for (pos = (head)->first; pos && ({ n = pos->next; 1; }); \
1137 pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member))
1145 for (pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member);\
1147 pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member))
1156 pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member))
1167 pos && ({ n = pos->member.next; 1; }); \