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
Unified · Split
| @@ -3884,10 +3884,8 @@ static int ext4_rename(struct mnt_idmap *idmap, struct inode *old_dir, · 3883 unmodified lines | ||
| 3884 | 3884 | goto end_rename; |
| 3885 | 3885 | } |
| 3886 | 3886 | retval = ext4_rename_dir_prepare(handle, &old); |
| 3887 | − if (retval) { | |
| 3888 | − inode_unlock(old.inode); | |
| 3887 | + if (retval) | |
| 3889 | 3888 | goto end_rename; |
| 3890 | − } | |
| 3891 | 3889 | } |
| 3892 | 3890 | /* |
| 3893 | 3891 | * If we're renaming a file within an inline_data dir and adding or |