Commit 2067231a authored by Sun Ke's avatar Sun Ke Committed by Trond Myklebust

NFS: Fix missing unlock in nfs_unlink()

Add the missing unlock before goto.

Fixes: 3c59366c ("NFS: don't unhash dentry during unlink/rename")
Signed-off-by: default avatarSun Ke <sunke32@huawei.com>
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
parent 3fa5cbdc
......@@ -2484,8 +2484,10 @@ int nfs_unlink(struct inode *dir, struct dentry *dentry)
*/
error = -ETXTBSY;
if (WARN_ON(dentry->d_flags & DCACHE_NFSFS_RENAMED) ||
WARN_ON(dentry->d_fsdata == NFS_FSDATA_BLOCKED))
WARN_ON(dentry->d_fsdata == NFS_FSDATA_BLOCKED)) {
spin_unlock(&dentry->d_lock);
goto out;
}
if (dentry->d_fsdata)
/* old devname */
kfree(dentry->d_fsdata);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment