diff options
author | Tejun Heo <tj@kernel.org> | 2008-08-25 17:50:16 (GMT) |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2008-10-09 06:56:04 (GMT) |
commit | a1ed5b0cffe4b16a93a6a3390e8cee0fbef94f86 (patch) | |
tree | 1f07794d793124c0ab514378d9179f595769a813 /.mailmap | |
parent | 710027a48ede75428cc68eaa8ae2269b1e356e2c (diff) | |
download | linux-a1ed5b0cffe4b16a93a6a3390e8cee0fbef94f86.tar.xz |
klist: don't iterate over deleted entries
A klist entry is kept on the list till all its current iterations are
finished; however, a new iteration after deletion also iterates over
deleted entries as long as their reference count stays above zero.
This causes problems for cases where there are users which iterate
over the list while synchronized against list manipulations and
natuarally expect already deleted entries to not show up during
iteration.
This patch implements dead flag which gets set on deletion so that
iteration can skip already deleted entries. The dead flag piggy backs
on the lowest bit of knode->n_klist and only visible to klist
implementation proper.
While at it, drop klist_iter->i_head as it's redundant and doesn't
offer anything in semantics or performance wise as klist_iter->i_klist
is dereferenced on every iteration anyway.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to '.mailmap')
0 files changed, 0 insertions, 0 deletions