summaryrefslogtreecommitdiff
path: root/fs/namespace.c
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2023-11-22 13:44:37 +0100
committerChristian Brauner <brauner@kernel.org>2023-11-28 14:08:47 +0100
commite65a29f0235a438ece414d2d99bbf0d31aa97d04 (patch)
tree46769d8cf28e5f2a74c8dd632dd7589b0a083da7 /fs/namespace.c
parent71eb6b6b0ba93b1467bccff57b5de746b09113d2 (diff)
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/namespace.c')
-rw-r--r--fs/namespace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index b899cbbe24d9..78366f114515 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -4289,7 +4289,7 @@ static int can_idmap_mount(const struct mount_kattr *kattr, struct mount *mnt)
* Creating an idmapped mount with the filesystem wide idmapping
* doesn't make sense so block that. We don't allow mushy semantics.
*/
- if (!check_fsmapping(kattr->mnt_idmap, m->mnt_sb))
+ if (kattr->mnt_userns == m->mnt_sb->s_user_ns)
return -EINVAL;
/*