From 4a13fbc1482a0d1d77fca17b2fd3fbb5db44b1fb Mon Sep 17 00:00:00 2001 From: Arnaldo Carvalho de Melo Date: Mon, 20 Mar 2006 17:19:17 -0800 Subject: [PATCH] --- yaml --- r: 22140 b: refs/heads/master c: e229c2fb3370a0c4ebac06cad67ce1cb35abcfe6 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/linux/list.h | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 24a63d20fce9..4ee029ae61ae 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7b204afd45820fc21b5983205ad535c6b8088765 +refs/heads/master: e229c2fb3370a0c4ebac06cad67ce1cb35abcfe6 diff --git a/trunk/include/linux/list.h b/trunk/include/linux/list.h index beb6e48e116f..67258b47e9ca 100644 --- a/trunk/include/linux/list.h +++ b/trunk/include/linux/list.h @@ -410,6 +410,17 @@ static inline void list_splice_init(struct list_head *list, prefetch(pos->member.next), &pos->member != (head); \ pos = list_entry(pos->member.next, typeof(*pos), member)) +/** + * list_for_each_entry_from - iterate over list of given type + * continuing from existing point + * @pos: the type * to use as a loop counter. + * @head: the head for your list. + * @member: the name of the list_struct within the struct. + */ +#define list_for_each_entry_from(pos, head, member) \ + for (; prefetch(pos->member.next), &pos->member != (head); \ + pos = list_entry(pos->member.next, typeof(*pos), member)) + /** * list_for_each_entry_safe - iterate over list of given type safe against removal of list entry * @pos: the type * to use as a loop counter.