···2640264026412641static void free_mnt_ns(struct mnt_namespace *ns)26422642{26432643- proc_free_inum(ns->proc_inum);26432643+ proc_free_inum(ns->ns.inum);26442644 put_user_ns(ns->user_ns);26452645 kfree(ns);26462646}···26622662 new_ns = kmalloc(sizeof(struct mnt_namespace), GFP_KERNEL);26632663 if (!new_ns)26642664 return ERR_PTR(-ENOMEM);26652665- ret = proc_alloc_inum(&new_ns->proc_inum);26652665+ ret = proc_alloc_inum(&new_ns->ns.inum);26662666 if (ret) {26672667 kfree(new_ns);26682668 return ERR_PTR(ret);···32013201static unsigned int mntns_inum(void *ns)32023202{32033203 struct mnt_namespace *mnt_ns = ns;32043204- return mnt_ns->proc_inum;32043204+ return mnt_ns->ns.inum;32053205}3206320632073207const struct proc_ns_operations mntns_operations = {
+2-1
include/linux/ipc_namespace.h
···66#include <linux/rwsem.h>77#include <linux/notifier.h>88#include <linux/nsproxy.h>99+#include <linux/ns_common.h>9101011/*1112 * ipc namespace events···6968 /* user_ns which owns the ipc ns */7069 struct user_namespace *user_ns;71707272- unsigned int proc_inum;7171+ struct ns_common ns;7372};74737574extern struct ipc_namespace init_ipc_ns;
+8
include/linux/ns_common.h
···11+#ifndef _LINUX_NS_COMMON_H22+#define _LINUX_NS_COMMON_H33+44+struct ns_common {55+ unsigned int inum;66+};77+88+#endif
+2-1
include/linux/pid_namespace.h
···88#include <linux/threads.h>99#include <linux/nsproxy.h>1010#include <linux/kref.h>1111+#include <linux/ns_common.h>11121213struct pidmap {1314 atomic_t nr_free;···4443 kgid_t pid_gid;4544 int hide_pid;4645 int reboot; /* group exit code if this pidns was rebooted */4747- unsigned int proc_inum;4646+ struct ns_common ns;4847};49485049extern struct pid_namespace init_pid_ns;
+2-1
include/linux/user_namespace.h
···3344#include <linux/kref.h>55#include <linux/nsproxy.h>66+#include <linux/ns_common.h>67#include <linux/sched.h>78#include <linux/err.h>89···2726 int level;2827 kuid_t owner;2928 kgid_t group;3030- unsigned int proc_inum;2929+ struct ns_common ns;31303231 /* Register of per-UID persistent keyrings for this namespace */3332#ifdef CONFIG_PERSISTENT_KEYRINGS