Skip to content
Snippets Groups Projects
user avatar
Al Viro authored
We used to get the victim pinned by dentry_unhash() prior to commit
64252c75 ("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: default avatarAl Viro <viro@zeniv.linux.org.uk>
Tested-by: default avatarSimon Kirby <sim@hostway.ca>
Cc: stable@kernel.org (3.0.x)
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
1d2ef590
History
Name Last commit Last update