X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=include%2Flinux%2Flist.h;h=969f6e92d0895a93b593829159bdef20220b0dcb;hb=0552f297951d0ab3a1027f9b06fa40c9be8378ba;hp=db35ef02e74522881a1d5b1e00ce993280e2178b;hpb=d3d0ba7b8fb8f57c33207adcb41f40c176148c03;p=linux-2.6-omap-h63xx.git diff --git a/include/linux/list.h b/include/linux/list.h index db35ef02e74..969f6e92d08 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, next->next->pprev = &next->next; } +/* + * Move a list from one list head to another. Fixup the pprev + * reference of the first entry if it exists. + */ +static inline void hlist_move_list(struct hlist_head *old, + struct hlist_head *new) +{ + new->first = old->first; + if (new->first) + new->first->pprev = &new->first; + old->first = NULL; +} + #define hlist_entry(ptr, type, member) container_of(ptr,type,member) #define hlist_for_each(pos, head) \