llist: Provide a safe version for llist_for_each()
authorByungchul Park <byungchul.park@lge.com>
Fri, 12 May 2017 00:36:56 +0000 (09:36 +0900)
committerIngo Molnar <mingo@kernel.org>
Tue, 23 May 2017 08:01:33 +0000 (10:01 +0200)
commitd714893e61cd8c6e5c7e095f7dd615aa434bca95
treeacaaf82534428946d0bb54a61e401df443db32cc
parent6c8557bdb28df3ae97476c5e2aed6373cd235aab
llist: Provide a safe version for llist_for_each()

Sometimes we have to dereference next field of llist node before entering
loop becasue the node might be deleted or the next field might be
modified within the loop. So this adds the safe version of llist_for_each(),
that is, llist_for_each_safe().

Signed-off-by: Byungchul Park <byungchul.park@lge.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Huang, Ying <ying.huang@intel.com>
Cc: <kernel-team@lge.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1494549416-10539-1-git-send-email-byungchul.park@lge.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
include/linux/llist.h