fs: move should_remove_suid()
authorChristian Brauner <brauner@kernel.org>
Mon, 17 Oct 2022 15:06:35 +0000 (17:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Mar 2023 10:52:24 +0000 (11:52 +0100)
commite44f23ef91605b61cb2f01994ab5d89e7daaf0ea
treec20b5b27e7a73df7f680af31350bbca8d8be3910
parent18c2750856dc907ccff05c747e079495f75ea35c
fs: move should_remove_suid()

commit e243e3f94c804ecca9a8241b5babe28f35258ef4 upstream.

Move the helper from inode.c to attr.c. This keeps the the core of the
set{g,u}id stripping logic in one place when we add follow-up changes.
It is the better place anyway, since should_remove_suid() returns
ATTR_KILL_S{G,U}ID flags.

Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/attr.c
fs/inode.c