Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c16cbd82 authored by Theodore Ts'o's avatar Theodore Ts'o Committed by Greg Kroah-Hartman
Browse files

ext4: fix possible double unlock when moving a directory

commit 70e42feab2e20618ddd0cbfc4ab4b08628236ecd upstream.

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: default avatarDan Carpenter <error27@gmail.com>
Reported-by: default avatar <syzbot+0c73d1d8b952c5f3d714@syzkaller.appspotmail.com>
Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6a1bd14d
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -3866,11 +3866,9 @@ 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
	 * setting the new dirent causes a conversion from inline_data to