smp: Iterate functions through llist_for_each_entry_safe()
authorJan Kara <jack@suse.cz>
Mon, 24 Feb 2014 15:39:55 +0000 (16:39 +0100)
committerJens Axboe <axboe@fb.com>
Mon, 24 Feb 2014 22:46:47 +0000 (14:46 -0800)
commit5fd77595ec62141fa71e575bdbf410e0192f87d0
tree9c34d82ab352a92cc260861084b577b3a73f7cba
parent6d113398dcf4dfcd9787a4ead738b186f7b7ff0f
smp: Iterate functions through llist_for_each_entry_safe()

The IPI function llist iteration is open coded. Lets simplify this
with using an llist iterator.

Also we want to keep the iteration safe against possible
csd.llist->next value reuse from the IPI handler. At least the block
subsystem used to do such things so lets stay careful and use
llist_for_each_entry_safe().

Signed-off-by: Jan Kara <jack@suse.cz>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jens Axboe <axboe@fb.com>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
kernel/smp.c