ovl: remove privs in ovl_copyfile()
authorAmir Goldstein <amir73il@gmail.com>
Mon, 17 Oct 2022 15:06:38 +0000 (17:06 +0200)
committerChristian Brauner (Microsoft) <brauner@kernel.org>
Tue, 18 Oct 2022 08:09:48 +0000 (10:09 +0200)
commitb306e90ffabdaa7e3b3350dbcd19b7663e71ab17
tree4cc53417c3b57010e4f9eee76011e4a38e3557db
parented5a7047d2011cb6b2bf84ceb6680124cc6a7d95
ovl: remove privs in ovl_copyfile()

Underlying fs doesn't remove privs because copy_range/remap_range are
called with privileged mounter credentials.

This fixes some failures in fstest generic/673.

Fixes: 8ede205541ff ("ovl: add reflink/copyfile/dedup support")
Acked-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
fs/overlayfs/file.c