diff options
author | Christian Brauner <brauner@kernel.org> | 2025-06-11 11:59:13 +0200 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2025-06-11 11:59:13 +0200 |
commit | cd267cdef5fe98006a6b989c5cda035032bb839f (patch) | |
tree | 552a87c24c71f2fbaa69871a470889dda0ca9896 /fs/namespace.c | |
parent | 19272b37aa4f83ca52bdf9c16d5d81bdd1354494 (diff) | |
parent | 7f4f229195b73606ded77e56943f463b78adf635 (diff) |
Merge patch series "nsfs: expose the stable inode numbers in a public header"
Christian Brauner <brauner@kernel.org> says:
Userspace heavily relies on the root inode numbers for namespaces to
identify the initial namespaces. That's already a hard dependency. So we
cannot change that anymore. Move the initial inode numbers to a public
header and align the only two namespaces that currently don't do that
with all the other namespaces.
* patches from https://lore.kernel.org/20250606-work-nsfs-v1-0-b8749c9a8844@kernel.org:
mntns: use stable inode number for initial mount ns
netns: use stable inode number for initial mount ns
nsfs: move root inode number to uapi
Link: https://lore.kernel.org/20250606-work-nsfs-v1-0-b8749c9a8844@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/namespace.c')
-rw-r--r-- | fs/namespace.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/namespace.c b/fs/namespace.c index e13d9ab4f564..7ca4612c7ae9 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -6203,9 +6203,11 @@ static void __init init_mount_tree(void) if (IS_ERR(mnt)) panic("Can't create rootfs"); - ns = alloc_mnt_ns(&init_user_ns, false); + ns = alloc_mnt_ns(&init_user_ns, true); if (IS_ERR(ns)) panic("Can't allocate initial namespace"); + ns->seq = atomic64_inc_return(&mnt_ns_seq); + ns->ns.inum = PROC_MNT_INIT_INO; m = real_mount(mnt); ns->root = m; ns->nr_mounts = 1; |