NFS: Fix missing unlock in nfs_unlink()
Add the missing unlock before goto.
Fixes: 3c59366c20
("NFS: don't unhash dentry during unlink/rename")
Signed-off-by: Sun Ke <sunke32@huawei.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
This commit is contained in:
parent
3fa5cbdc44
commit
2067231a9e
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue