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()
119 __list_del(entry->prev, entry->next); in __list_del_clearprev()
134 __list_del(entry->prev, entry->next); in __list_del_entry()
140 entry->next = LIST_POISON1; in list_del()
154 new->next = old->next; in list_replace()
155 new->next->prev = new; in list_replace()
157 new->prev->next = new; in list_replace()
230 first->prev->next = last->next; in list_bulk_move_tail()
231 last->next->prev = first->prev; in list_bulk_move_tail()
233 head->prev->next = first; in list_bulk_move_tail()
236 last->next = head; in list_bulk_move_tail()
259 return list->next == head; in list_is_last()
268 return READ_ONCE(head->next) == head; in list_empty()
286 struct list_head *next = head->next; in list_empty_careful() local
287 return (next == head) && (next == head->prev); in list_empty_careful()
299 first = head->next; in list_rotate_left()
328 return !list_empty(head) && (head->next == head->prev); in list_is_singular()
334 struct list_head *new_first = entry->next; in __list_cut_position()
335 list->next = head->next; in __list_cut_position()
336 list->next->prev = list; in __list_cut_position()
338 entry->next = list; in __list_cut_position()
339 head->next = new_first; in __list_cut_position()
363 (head->next != entry && head != entry)) in list_cut_position()
389 if (head->next == entry) { in list_cut_before()
393 list->next = head->next; in list_cut_before()
394 list->next->prev = list; in list_cut_before()
396 list->prev->next = list; in list_cut_before()
397 head->next = entry; in list_cut_before()
403 struct list_head *next) in __list_splice() argument
405 struct list_head *first = list->next; in __list_splice()
409 prev->next = first; in __list_splice()
411 last->next = next; in __list_splice()
412 next->prev = last; in __list_splice()
424 __list_splice(list, head, head->next); in list_splice()
450 __list_splice(list, head, head->next); in list_splice_init()
490 list_entry((ptr)->next, type, member)
513 struct list_head *pos__ = READ_ONCE(head__->next); \
523 list_entry((pos)->member.next, typeof(*(pos)), member)
539 for (pos = (head)->next; pos != (head); pos = pos->next)
556 for (pos = (head)->next, n = pos->next; pos != (head); \
557 pos = n, n = pos->next)
743 h->next = NULL; in INIT_HLIST_NODE()
759 struct hlist_node *next = n->next; in __hlist_del() local
762 WRITE_ONCE(*pprev, next); in __hlist_del()
763 if (next) in __hlist_del()
764 next->pprev = pprev; in __hlist_del()
770 n->next = LIST_POISON1; in hlist_del()
785 n->next = first; in hlist_add_head()
787 first->pprev = &n->next; in hlist_add_head()
794 struct hlist_node *next) in hlist_add_before() argument
796 n->pprev = next->pprev; in hlist_add_before()
797 n->next = next; in hlist_add_before()
798 next->pprev = &n->next; in hlist_add_before()
805 n->next = prev->next; in hlist_add_behind()
806 prev->next = n; in hlist_add_behind()
807 n->pprev = &prev->next; in hlist_add_behind()
809 if (n->next) in hlist_add_behind()
810 n->next->pprev = &n->next; in hlist_add_behind()
816 n->pprev = &n->next; in hlist_add_fake()
821 return h->pprev == &h->next; in hlist_fake()
831 return !n->next && n->pprev == &h->first; in hlist_is_singular_node()
850 for (pos = (head)->first; pos ; pos = pos->next)
853 for (pos = (head)->first; pos && ({ n = pos->next; 1; }); \
870 pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member))
878 for (pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member);\
880 pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member))
889 pos = hlist_entry_safe((pos)->member.next, typeof(*(pos)), member))
900 pos && ({ n = pos->member.next; 1; }); \