lkml.org 
[lkml]   [2001]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Fix for SMP deadlock in autofs4


On Fri, 20 Apr 2001, Linus Torvalds wrote:

>
>
> On Fri, 20 Apr 2001, Jeremy Fitzhardinge wrote:
> >
> > I kept the dget/put out caution and ignorance, but they're clearly
> > problematic. I'm happy to drop them if holding dcache_lock is enough
> > to keep the tree stable while I traverse it.
>
> How does this patch look to you people?
>
> It's untested, but looks fairly obvious. It removes the increment, and
> changes autofs4_expire() to properly bump the count of the returned dentry
> (and callers will dput() it when done). This may be unnecessarily careful,
> but it's the RightThing(tm) to do.

Looks sane for me. However, I would add check for dentry being hashed and
would skip the unhashed ones. Otherwise you can get a directory that
had been removed but is still busy - doesn't look like a right thing to
do. Jeremy?
Al

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:17    [W:0.294 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site