->atomic_open() is called with only a shared lock on the directory when O_CREAT wasn't requested. If the dentry is negative it is still called because the filesystem might want to revalidate-and-open in an atomic operations. NFS does this to fullfil close-to-open consistency requirements. NFS has complex code to drop the dentry and reallocate with d_alloc_parallel() in this case to ensure that only one lookup/open happens at a time. It would be simpler to have NFS return zero from ->d_revalidate in this case so that d_alloc_parallel() will be calling in lookup_open() and NFS wan't need to worry about concurrency. So this series makes that change to NFS to simplify atomic_open and remove the d_drop() and d_alloc_parallel(), and then changes lookup_open() so that atomic_open() can never be called without exclusive access to the dentry. NeilBrown