On Wed, 30 Nov 2005, Trond Myklebust wrote: > On Tue, 2005-11-29 at 23:15 -0500, Jeff Moyer wrote: > > > The patch only drops the semaphore if d_lookup finds the dentry and the > > dentry has a revalidate routine. I don't follow how you can end up with > > multiple dentries for the same file in this case. > > > > Sorry if I'm missing something obvious. > > The inode->i_sem is what ensures that nobody can insert a new dentry > between the lookup of the cached dentry by d_lookup() and the call to > ->lookup() (which instantiates a new dentry). > > Imagine you have two separate processes that are doing a __lookup_hash() > of the same cached dentry. Now imagine that d_revalidate() of the dentry > fails.
And that would be why lookup is only called if d_lookup fails in do_lookup when called from the link_path_walk routine. Do you think it is possible to do this safely in __lookup_hash with a similar re-ordering? Ian _______________________________________________ autofs mailing list [email protected] http://linux.kernel.org/mailman/listinfo/autofs
