]> git.itanic.dy.fi Git - linux-stable/commit
ext2: Avoid reading renamed directory if parent does not change
authorJan Kara <jack@suse.cz>
Thu, 12 Oct 2023 21:14:22 +0000 (23:14 +0200)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 25 Nov 2023 07:53:20 +0000 (02:53 -0500)
commit7307b73fa5a82661808b5541972176c344978789
treeca7a022a07f209e272848f5ae048e0b446d5a4db
parent9d35cebb794bb7be93db76c3383979c7deacfef9
ext2: Avoid reading renamed directory if parent does not change

The VFS will not be locking moved directory if its parent does not
change. Change ext2 rename code to avoid reading renamed directory if
its parent does not change. Although it is currently harmless it is a
bad practice to read directory contents without inode->i_rwsem.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/ext2/namei.c