nfs: dont unhash target if renaming a directory
authorMiklos Szeredi <mszeredi@suse.cz>
Thu, 3 Dec 2009 20:58:56 +0000 (15:58 -0500)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Thu, 3 Dec 2009 20:58:56 +0000 (15:58 -0500)
commit27226104e60964f21717e0f452cecd45c85a64c6
treefc0bf5aea3d316034a9d51ce00a135e9ddbce5f2
parent28f79a1a695e7a5b00af3b6713b449e08581ffbb
nfs: dont unhash target if renaming a directory

Move unhashing the target to after the check for existence and being a
non-directory.

If renaming a directory then the VFS already unhashes the target if it
is not busy.  If it's busy then acquiring more references during the
rename makes no difference.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/dir.c