提交 2067231a 编写于 作者: S Sun Ke 提交者: 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: NSun Ke <sunke32@huawei.com>
Signed-off-by: NTrond Myklebust <trond.myklebust@hammerspace.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册