Skip to content

Commit 70e42fe

Browse files
committed
ext4: fix possible double unlock when moving a directory
Fixes: 0813299 ("ext4: Fix possible corruption when moving a directory") Link: https://lore.kernel.org/r/[email protected] Reported-by: Dan Carpenter <[email protected]> Reported-by: [email protected] Signed-off-by: Theodore Ts'o <[email protected]>
1 parent eeac8ed commit 70e42fe

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

fs/ext4/namei.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3884,10 +3884,8 @@ static int ext4_rename(struct mnt_idmap *idmap, struct inode *old_dir,
38843884
goto end_rename;
38853885
}
38863886
retval = ext4_rename_dir_prepare(handle, &old);
3887-
if (retval) {
3888-
inode_unlock(old.inode);
3887+
if (retval)
38893888
goto end_rename;
3890-
}
38913889
}
38923890
/*
38933891
* If we're renaming a file within an inline_data dir and adding or

0 commit comments

Comments
 (0)