]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
VFS: Fix the nfs sillyrename regression in kernel 2.6.38
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 15 Mar 2011 17:36:43 +0000 (13:36 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 23 Mar 2011 20:03:32 +0000 (13:03 -0700)
commit2c048b5dbd657781e9a37e8efa5c42d65c119057
tree368f76c5641d1fdca68bd5f4a9d5447893e100fd
parentc4e8d54f595b01d30e9b2793413d44f83deb7450
VFS: Fix the nfs sillyrename regression in kernel 2.6.38

commit c83ce989cb5ff86575821992ea82c4df5c388ebc upstream.

The new vfs locking scheme introduced in 2.6.38 breaks NFS sillyrename
because the latter relies on being able to determine the parent
directory of the dentry in the ->iput() callback in order to send the
appropriate unlink rpc call.

Looking at the code that cares about races with dput(), there doesn't
seem to be anything that specifically uses d_parent as a test for
whether or not there is a race:
  - __d_lookup_rcu(), __d_lookup() all test for d_hashed() after d_parent
  - shrink_dcache_for_umount() is safe since nothing else can rearrange
    the dentries in that super block.
  - have_submount(), select_parent() and d_genocide() can test for a
    deletion if we set the DCACHE_DISCONNECTED flag when the dentry
    is removed from the parent's d_subdirs list.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/dcache.c