reiserfs: Avoid touching renamed directory if parent does not change
authorJan Kara <jack@suse.cz>
Thu, 12 Oct 2023 21:14:20 +0000 (23:14 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Feb 2024 20:14:26 +0000 (20:14 +0000)
commit17e1361cb91dc1325834da95d2ab532959d2debc
tree2b499874d456d0ef950d2f2e6bdf37c6418cdd7f
parent408f4c8efddc8619e7cdc337a5fea8cc1f87832b
reiserfs: Avoid touching renamed directory if parent does not change

[ Upstream commit 49db9b1b86a82448dfaf3fcfefcf678dee56c8ed ]

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>
fs/reiserfs/namei.c