summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2025-09-17 13:28:01 +0300
committerChristian Brauner <brauner@kernel.org>2025-09-19 15:26:18 +0300
commitb2a0b192084acd0a86d66cbbc61e17ba1f5bd583 (patch)
tree55c30a2ac5aa7d6f805f93518c00e4a3bdbabeaf /include/linux
parent93f67a7ddadf6ed8997c000df9790e5d64617196 (diff)
downloadlinux-b2a0b192084acd0a86d66cbbc61e17ba1f5bd583.tar.xz
mnt: expose pointer to init_mnt_ns
There's various scenarios where we need to know whether we are in the initial set of namespaces or not to e.g., shortcut permission checking. All namespaces expose that information. Let's do that too. Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mnt_namespace.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/mnt_namespace.h b/include/linux/mnt_namespace.h
index 70b366b64816..6d1c4c218c14 100644
--- a/include/linux/mnt_namespace.h
+++ b/include/linux/mnt_namespace.h
@@ -11,6 +11,8 @@ struct fs_struct;
struct user_namespace;
struct ns_common;
+extern struct mnt_namespace init_mnt_ns;
+
extern struct mnt_namespace *copy_mnt_ns(unsigned long, struct mnt_namespace *,
struct user_namespace *, struct fs_struct *);
extern void put_mnt_ns(struct mnt_namespace *ns);