diff options
author | Christian Brauner <brauner@kernel.org> | 2023-11-22 15:44:37 +0300 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2023-11-28 16:08:47 +0300 |
commit | e65a29f0235a438ece414d2d99bbf0d31aa97d04 (patch) | |
tree | 46769d8cf28e5f2a74c8dd632dd7589b0a083da7 /fs/mnt_idmapping.c | |
parent | 71eb6b6b0ba93b1467bccff57b5de746b09113d2 (diff) | |
download | linux-e65a29f0235a438ece414d2d99bbf0d31aa97d04.tar.xz |
mnt_idmapping: remove check_fsmapping()
The helper is a bit pointless. Just open-code the check.
Link: https://lore.kernel.org/r/20231122-vfs-mnt_idmap-v1-1-dae4abdde5bd@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/mnt_idmapping.c')
-rw-r--r-- | fs/mnt_idmapping.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/fs/mnt_idmapping.c b/fs/mnt_idmapping.c index 57d1dedf3f8f..2674942311c3 100644 --- a/fs/mnt_idmapping.c +++ b/fs/mnt_idmapping.c @@ -26,19 +26,6 @@ struct mnt_idmap nop_mnt_idmap = { EXPORT_SYMBOL_GPL(nop_mnt_idmap); /** - * check_fsmapping - check whether an mount idmapping is allowed - * @idmap: idmap of the relevent mount - * @sb: super block of the filesystem - * - * Return: true if @idmap is allowed, false if not. - */ -bool check_fsmapping(const struct mnt_idmap *idmap, - const struct super_block *sb) -{ - return idmap->owner != sb->s_user_ns; -} - -/** * initial_idmapping - check whether this is the initial mapping * @ns: idmapping to check * @@ -94,8 +81,8 @@ static inline bool no_idmapping(const struct user_namespace *mnt_userns, */ vfsuid_t make_vfsuid(struct mnt_idmap *idmap, - struct user_namespace *fs_userns, - kuid_t kuid) + struct user_namespace *fs_userns, + kuid_t kuid) { uid_t uid; struct user_namespace *mnt_userns = idmap->owner; |