From: Al Viro Date: Wed, 14 Sep 2011 17:55:41 +0000 (+0100) Subject: restore pinning the victim dentry in vfs_rmdir()/vfs_rename_dir() X-Git-Tag: v3.1-rc7~64 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d2ef5901483004d74947bbf78d5146c24038fe7;p=pandora-kernel.git restore pinning the victim dentry in vfs_rmdir()/vfs_rename_dir() We used to get the victim pinned by dentry_unhash() prior to commit 64252c75a219 ("vfs: remove dget() from dentry_unhash()") and ->rmdir() and ->rename() instances relied on that; most of them don't care, but ones that used d_delete() themselves do. As the result, we are getting rmdir() oopses on NFS now. Just grab the reference before locking the victim and drop it explicitly after unlocking, same as vfs_rename_other() does. Signed-off-by: Al Viro Tested-by: Simon Kirby Cc: stable@kernel.org (3.0.x) Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed