diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2023-03-19 17:38:26 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2023-03-19 17:38:26 +0100 |
commit | 995bba436bc5c6a200510828a09cd404a7f2a129 (patch) | |
tree | 4802bb3b37bf81862f6a97d5650e6ef6bc1434da /fs | |
parent | Merge tag 'fbdev-for-6.3-rc3' of git://git.kernel.org/pub/scm/linux/kernel/gi... (diff) | |
parent | ext4: fix possible double unlock when moving a directory (diff) | |
download | linux-995bba436bc5c6a200510828a09cd404a7f2a129.tar.xz linux-995bba436bc5c6a200510828a09cd404a7f2a129.zip |
Merge tag 'ext4_for_linus_urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
Pull ext4 fix from Ted Ts'o:
"Fix a double unlock bug on an error path in ext4, found by smatch and
syzkaller"
* tag 'ext4_for_linus_urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
ext4: fix possible double unlock when moving a directory
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ext4/namei.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index 31e21de56432..a5010b5b8a8c 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c @@ -3884,10 +3884,8 @@ static int ext4_rename(struct mnt_idmap *idmap, struct inode *old_dir, goto end_rename; } retval = ext4_rename_dir_prepare(handle, &old); - if (retval) { - inode_unlock(old.inode); + if (retval) goto end_rename; - } } /* * If we're renaming a file within an inline_data dir and adding or |