Skip to content

Commit 2067231

Browse files
sunke-lpTrond Myklebust
authored andcommitted
NFS: Fix missing unlock in nfs_unlink()
Add the missing unlock before goto. Fixes: 3c59366 ("NFS: don't unhash dentry during unlink/rename") Signed-off-by: Sun Ke <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
1 parent 3fa5cbd commit 2067231

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

fs/nfs/dir.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2484,8 +2484,10 @@ int nfs_unlink(struct inode *dir, struct dentry *dentry)
24842484
*/
24852485
error = -ETXTBSY;
24862486
if (WARN_ON(dentry->d_flags & DCACHE_NFSFS_RENAMED) ||
2487-
WARN_ON(dentry->d_fsdata == NFS_FSDATA_BLOCKED))
2487+
WARN_ON(dentry->d_fsdata == NFS_FSDATA_BLOCKED)) {
2488+
spin_unlock(&dentry->d_lock);
24882489
goto out;
2490+
}
24892491
if (dentry->d_fsdata)
24902492
/* old devname */
24912493
kfree(dentry->d_fsdata);

0 commit comments

Comments
 (0)