提交 70e42fea 编写于 作者: T Theodore Ts'o

ext4: fix possible double unlock when moving a directory

Fixes: 0813299c ("ext4: Fix possible corruption when moving a directory")
Link: https://lore.kernel.org/r/5efbe1b9-ad8b-4a4f-b422-24824d2b775c@kili.mountainReported-by: NDan Carpenter <error27@gmail.com>
Reported-by: syzbot+0c73d1d8b952c5f3d714@syzkaller.appspotmail.com
Signed-off-by: NTheodore Ts'o <tytso@mit.edu>
上级 eeac8ede
...@@ -3884,10 +3884,8 @@ static int ext4_rename(struct mnt_idmap *idmap, struct inode *old_dir, ...@@ -3884,10 +3884,8 @@ 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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册