]> git.baikalelectronics.ru Git - kernel.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)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 15 Mar 2011 22:46:11 +0000 (15:46 -0700)
commit813bb9f0d0e1e5c9984aa5df34bf5357b8f19bd1
tree29741017daffb074fbe09c3aec6d937f2f0c140d
parent58bfb2c3b1d199b54f3ec46a5f25514532baa597
VFS: Fix the nfs sillyrename regression in kernel 2.6.38

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>
Cc: stable@kernel.org (2.6.38, needs commit 58bfb2c3b1d1 "dcache.c:
create helper function for duplicated functionality" )
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/dcache.c