Commit 995bba43 authored by Linus Torvalds's avatar Linus Torvalds

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
parents a3671bd8 70e42fea
...@@ -3884,11 +3884,9 @@ static int ext4_rename(struct mnt_idmap *idmap, struct inode *old_dir, ...@@ -3884,11 +3884,9 @@ static int ext4_rename(struct mnt_idmap *idmap, struct inode *old_dir,
goto end_rename; goto end_rename;
} }
retval = ext4_rename_dir_prepare(handle, &old); retval = ext4_rename_dir_prepare(handle, &old);
if (retval) { if (retval)
inode_unlock(old.inode);
goto end_rename; goto end_rename;
} }
}
/* /*
* If we're renaming a file within an inline_data dir and adding or * If we're renaming a file within an inline_data dir and adding or
* setting the new dirent causes a conversion from inline_data to * setting the new dirent causes a conversion from inline_data to
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment