]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commita87ca053ae475183ad3269b3d140d1b6cbad94d8
treec20b5b27e7a73df7f680af31350bbca8d8be3910
parentdfa5f11fa5ad8ed91df85c7d096b82fcb3205e61
fs: move should_remove_suid()

commit 505c4dbc08adc6cd3580b578b5d3973d2f4f1e03 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