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

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
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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);