Trond Myklebust wrote: >You can if and only if > > - The dentry is unhashed, and you are holding the semaphore dir->i_sem >on the parent directory. >OR > - You are holding the spin lock dcache_lock. > > I decide to hold the dir->i_sem semaphore since d_drop() needs the dcache_lock to do the unhashing... >Note: on 2.6.x, the second condition needs to be modified a bit: you >probably need to hold dentry->d_lock too since the 2.6.x version of >d_lookup() is by and large lockless... > > I'll take a look asaic... SteveD.