diff options
-rw-r--r-- | include/linux/list.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/list.h b/include/linux/list.h index aab2db21b013..597094e0fdb5 100644 --- a/include/linux/list.h +++ b/include/linux/list.h | |||
@@ -419,6 +419,19 @@ static inline void list_splice_init(struct list_head *list, | |||
419 | pos = n, n = list_entry(n->member.next, typeof(*n), member)) | 419 | pos = n, n = list_entry(n->member.next, typeof(*n), member)) |
420 | 420 | ||
421 | /** | 421 | /** |
422 | * list_for_each_entry_safe_continue - iterate over list of given type | ||
423 | * continuing after existing point safe against removal of list entry | ||
424 | * @pos: the type * to use as a loop counter. | ||
425 | * @n: another type * to use as temporary storage | ||
426 | * @head: the head for your list. | ||
427 | * @member: the name of the list_struct within the struct. | ||
428 | */ | ||
429 | #define list_for_each_entry_safe_continue(pos, n, head, member) \ | ||
430 | for (pos = n, n = list_entry(n->member.next, typeof(*n), member); \ | ||
431 | &pos->member != (head); \ | ||
432 | pos = n, n = list_entry(n->member.next, typeof(*n), member)) | ||
433 | |||
434 | /** | ||
422 | * list_for_each_rcu - iterate over an rcu-protected list | 435 | * list_for_each_rcu - iterate over an rcu-protected list |
423 | * @pos: the &struct list_head to use as a loop counter. | 436 | * @pos: the &struct list_head to use as a loop counter. |
424 | * @head: the head for your list. | 437 | * @head: the head for your list. |