aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/list.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/list.h')
-rw-r--r--include/linux/list.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/list.h b/include/linux/list.h
index db35ef02e745..969f6e92d089 100644
--- a/include/linux/list.h
+++ b/include/linux/list.h
@@ -619,6 +619,19 @@ static inline void hlist_add_after(struct hlist_node *n,
619 next->next->pprev = &next->next; 619 next->next->pprev = &next->next;
620} 620}
621 621
622/*
623 * Move a list from one list head to another. Fixup the pprev
624 * reference of the first entry if it exists.
625 */
626static inline void hlist_move_list(struct hlist_head *old,
627 struct hlist_head *new)
628{
629 new->first = old->first;
630 if (new->first)
631 new->first->pprev = &new->first;
632 old->first = NULL;
633}
634
622#define hlist_entry(ptr, type, member) container_of(ptr,type,member) 635#define hlist_entry(ptr, type, member) container_of(ptr,type,member)
623 636
624#define hlist_for_each(pos, head) \ 637#define hlist_for_each(pos, head) \