reiserfs: Avoid touching renamed directory if parent does not change

[ Upstream commit 49db9b1b86 ]

The VFS will not be locking moved directory if its parent does not
change. Change reiserfs rename code to avoid touching renamed directory
if its parent does not change as without locking that can corrupt the
filesystem.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Jan Kara 2023-10-12 23:14:20 +02:00 • committed by Greg Kroah-Hartman
commit 17e1361cb9