[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.0808251219360.6639-100000@iolanthe.rowland.org>
Date: Mon, 25 Aug 2008 12:21:30 -0400 (EDT)
From: Alan Stern <stern@...land.harvard.edu>
To: Tejun Heo <teheo@...e.de>
cc: Greg Kroah-Hartman <gregkh@...e.de>,
Jens Axboe <jens.axboe@...cle.com>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH RESEND] klist: don't iterate over deleted entries
On Mon, 25 Aug 2008, Tejun Heo wrote:
> 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.
This seems like a reasonable sort of thing to do. I had considered
something like it in the past, but never bothered because it wasn't
needed at the time.
Alan Stern
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists