Lines Matching refs:next
28 WRITE_ONCE(list->next, list); in INIT_LIST_HEAD()
35 struct list_head *next);
40 struct list_head *next) in __list_add_valid() argument
58 struct list_head *next) in __list_add() argument
60 if (!__list_add_valid(new, prev, next)) in __list_add()
63 next->prev = new; in __list_add()
64 new->next = next; in __list_add()
66 WRITE_ONCE(prev->next, new); in __list_add()
79 __list_add(new, head, head->next); in list_add()
103 static inline void __list_del(struct list_head * prev, struct list_head * next) in __list_del() argument
105 next->prev = prev; in __list_del()
106 WRITE_ONCE(prev->next, next); in __list_del()
120 __list_del(entry->prev, entry->next); in __list_del_entry()
126 entry->next = LIST_POISON1; in list_del()
140 new->next = old->next; in list_replace()
141 new->next->prev = new; in list_replace()
143 new->prev->next = new; in list_replace()
194 return list->next == head; in list_is_last()
203 return READ_ONCE(head->next) == head; in list_empty()
221 struct list_head *next = head->next; in list_empty_careful() local
222 return (next == head) && (next == head->prev); in list_empty_careful()
234 first = head->next; in list_rotate_left()
245 return !list_empty(head) && (head->next == head->prev); in list_is_singular()
251 struct list_head *new_first = entry->next; in __list_cut_position()
252 list->next = head->next; in __list_cut_position()
253 list->next->prev = list; in __list_cut_position()
255 entry->next = list; in __list_cut_position()
256 head->next = new_first; in __list_cut_position()
280 (head->next != entry && head != entry)) in list_cut_position()
306 if (head->next == entry) { in list_cut_before()
310 list->next = head->next; in list_cut_before()
311 list->next->prev = list; in list_cut_before()
313 list->prev->next = list; in list_cut_before()
314 head->next = entry; in list_cut_before()
320 struct list_head *next) in __list_splice() argument
322 struct list_head *first = list->next; in __list_splice()
326 prev->next = first; in __list_splice()
328 last->next = next; in __list_splice()
329 next->prev = last; in __list_splice()
341 __list_splice(list, head, head->next); in list_splice()
367 __list_splice(list, head, head->next); in list_splice_init()
407 list_entry((ptr)->next, type, member)
430 struct list_head *pos__ = READ_ONCE(head__->next); \
440 list_entry((pos)->member.next, typeof(*(pos)), member)
456 for (pos = (head)->next; pos != (head); pos = pos->next)
473 for (pos = (head)->next, n = pos->next; pos != (head); \
474 pos = n, n = pos->next)
660 h->next = NULL; in INIT_HLIST_NODE()
676 struct hlist_node *next = n->next; in __hlist_del() local
679 WRITE_ONCE(*pprev, next); in __hlist_del()
680 if (next) in __hlist_del()
681 next->pprev = pprev; in __hlist_del()
687 n->next = LIST_POISON1; in hlist_del()
702 n->next = first; in hlist_add_head()
704 first->pprev = &n->next; in hlist_add_head()
711 struct hlist_node *next) in hlist_add_before() argument
713 n->pprev = next->pprev; in hlist_add_before()
714 n->next = next; in hlist_add_before()
715 next->pprev = &n->next; in hlist_add_before()
722 n->next = prev->next; in hlist_add_behind()
723 WRITE_ONCE(prev->next, n); in hlist_add_behind()
724 n->pprev = &prev->next; in hlist_add_behind()
726 if (n->next) in hlist_add_behind()
727 n->next->pprev = &n->next; in hlist_add_behind()
733 n->pprev = &n->next; in hlist_add_fake()
738 return h->pprev == &h->next; in hlist_fake()
748 return !n->next && n->pprev == &h->first; in hlist_is_singular_node()
767 for (pos = (head)->first; pos ; pos = pos->next)
770 for (pos = (head)->first; pos && ({ n = pos->next; 1; }); \
787 pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member))
795 for (pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member);\
797 pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member))
806 pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member))
817 pos && ({ n = pos->member.next; 1; }); \