mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-04 18:09:57 +00:00
ext4: fix possible double unlock when moving a directory
commit70e42feab2
upstream. Fixes:0813299c58
("ext4: Fix possible corruption when moving a directory") Link: https://lore.kernel.org/r/5efbe1b9-ad8b-4a4f-b422-24824d2b775c@kili.mountain Reported-by: Dan Carpenter <error27@gmail.com> Reported-by: syzbot+0c73d1d8b952c5f3d714@syzkaller.appspotmail.com Signed-off-by: Theodore Ts'o <tytso@mit.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
6a1bd14d5e
commit
c16cbd8233
1 changed files with 1 additions and 3 deletions
|
@ -3866,10 +3866,8 @@ static int ext4_rename(struct inode *old_dir, struct dentry *old_dentry,
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue