summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2025-06-06 11:45:09 +0200
committerChristian Brauner <brauner@kernel.org>2025-06-11 11:59:08 +0200
commit7f4f229195b73606ded77e56943f463b78adf635 (patch)
tree552a87c24c71f2fbaa69871a470889dda0ca9896 /include
parent9b0240b3ccc325c7a96cf362877180bc9e10d546 (diff)
mntns: use stable inode number for initial mount ns
Apart from the network and mount namespace all other namespaces expose a stable inode number and userspace has been relying on that for a very long time now. It's very much heavily used API. Align the mount namespace and use a stable inode number from the reserved procfs inode number space so this is consistent across all namespaces. Link: https://lore.kernel.org/20250606-work-nsfs-v1-3-b8749c9a8844@kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/proc_ns.h1
-rw-r--r--include/uapi/linux/nsfs.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/proc_ns.h b/include/linux/proc_ns.h
index 3ff0bd381704..6258455e49a4 100644
--- a/include/linux/proc_ns.h
+++ b/include/linux/proc_ns.h
@@ -48,6 +48,7 @@ enum {
PROC_CGROUP_INIT_INO = CGROUP_NS_INIT_INO,
PROC_TIME_INIT_INO = TIME_NS_INIT_INO,
PROC_NET_INIT_INO = NET_NS_INIT_INO,
+ PROC_MNT_INIT_INO = MNT_NS_INIT_INO,
};
#ifdef CONFIG_PROC_FS
diff --git a/include/uapi/linux/nsfs.h b/include/uapi/linux/nsfs.h
index 393778489d85..97d8d80d139f 100644
--- a/include/uapi/linux/nsfs.h
+++ b/include/uapi/linux/nsfs.h
@@ -50,6 +50,7 @@ enum init_ns_ino {
CGROUP_NS_INIT_INO = 0xEFFFFFFBU,
TIME_NS_INIT_INO = 0xEFFFFFFAU,
NET_NS_INIT_INO = 0xEFFFFFF9U,
+ MNT_NS_INIT_INO = 0xEFFFFFF8U,
};
#endif /* __LINUX_NSFS_H */