list_safe_reset_next9
Reset a stale list_for_each_entry_safe loop
Usage
list_safe_reset_next(pos, n, member);
Arguments
pos
the loop cursor used in the list_for_each_entry_safe loop
n
temporary storage used in list_for_each_entry_safe
member
the name of the list_head within the struct.
Overview
list_safe_reset_next is not safe to use in general if the list may be modified concurrently (eg. the lock is dropped in the loop body). An exception to this is if the cursor element (pos) is pinned in the list, and list_safe_reset_next is called after re-taking the lock and before completing the current iteration of the loop body.
Releases
3 releases since Debian 7 (Wheezy); the text changed 2 times.