On Thu, 2005-12-01 at 00:12 +0800, Ian Kent wrote: > > 2.4 kernels did a second d_lookup() after retaking the i_sem. The > > problem is what do you do in the case of a race: you either have to loop > > back (may lead to infinite loops of d_lookup()+d_invalidate()) or you do > > something like retry once, then return an error (which is what 2.4 > > kernels did). > > But in this case the semaphore is already held up until the revalidate so > I guess the concern is that the dentry goes away after releasing the > semaphore?
The problem is the same: dealing with the case of someone else populating the d_cache while you have temporarily dropped the dir->i_sem. > btw, a little aside. > I'm having trouble understanding where EEXIST is returned in a call such > as sys_mkdir. Can you help? The call to may_create() (at the top of vfs_mkdir()) will return EEXIST if the dentry is already positive i.e. dentry->d_inode is non-null. Cheers, Trond _______________________________________________ autofs mailing list [email protected] http://linux.kernel.org/mailman/listinfo/autofs
