Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ext4: fix possible double unlock when moving a directory

Fixes: 0813299c586b ("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>

+1 -3
+1 -3
fs/ext4/namei.c
··· 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