lkml.org 
[lkml]   [2008]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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



\
 
 \ /
  Last update: 2008-08-25 18:23    [W:1.426 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site