fs: move should_remove_suid()
authorChristian Brauner <brauner@kernel.org>
Mon, 17 Oct 2022 15:06:35 +0000 (17:06 +0200)
committerChristian Brauner (Microsoft) <brauner@kernel.org>
Tue, 18 Oct 2022 08:09:46 +0000 (10:09 +0200)
commite243e3f94c804ecca9a8241b5babe28f35258ef4
treefc09ac739fbc79f29e93facad741477ec38b84be
parent11c2a8700cdcabf9b639b7204a1e38e2a0b6798e
fs: move should_remove_suid()

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>
fs/attr.c
fs/inode.c