diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-10-31 22:56:04 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-12-04 14:31:00 -0500 |
commit | 435d5f4bb2ccba3b791d9ef61d2590e30b8e806e (patch) | |
tree | d482ef15334a703bbe406dab021880ce3d320870 /include/linux | |
parent | cac7f2429872d3733dc3f9915857b1691da2eb2f (diff) |
common object embedded into various struct ....ns
for now - just move corresponding ->proc_inum instances over there
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/ipc_namespace.h | 3 | ||||
-rw-r--r-- | include/linux/ns_common.h | 8 | ||||
-rw-r--r-- | include/linux/pid_namespace.h | 3 | ||||
-rw-r--r-- | include/linux/user_namespace.h | 3 | ||||
-rw-r--r-- | include/linux/utsname.h | 3 |
5 files changed, 16 insertions, 4 deletions
diff --git a/include/linux/ipc_namespace.h b/include/linux/ipc_namespace.h index 35e7eca4e33b..52a640128151 100644 --- a/include/linux/ipc_namespace.h +++ b/include/linux/ipc_namespace.h @@ -6,6 +6,7 @@ #include <linux/rwsem.h> #include <linux/notifier.h> #include <linux/nsproxy.h> +#include <linux/ns_common.h> /* * ipc namespace events @@ -68,7 +69,7 @@ struct ipc_namespace { /* user_ns which owns the ipc ns */ struct user_namespace *user_ns; - unsigned int proc_inum; + struct ns_common ns; }; extern struct ipc_namespace init_ipc_ns; diff --git a/include/linux/ns_common.h b/include/linux/ns_common.h new file mode 100644 index 000000000000..e7db1cd54047 --- /dev/null +++ b/include/linux/ns_common.h @@ -0,0 +1,8 @@ +#ifndef _LINUX_NS_COMMON_H +#define _LINUX_NS_COMMON_H + +struct ns_common { + unsigned int inum; +}; + +#endif diff --git a/include/linux/pid_namespace.h b/include/linux/pid_namespace.h index 1997ffc295a7..b9cf6c51b181 100644 --- a/include/linux/pid_namespace.h +++ b/include/linux/pid_namespace.h @@ -8,6 +8,7 @@ #include <linux/threads.h> #include <linux/nsproxy.h> #include <linux/kref.h> +#include <linux/ns_common.h> struct pidmap { atomic_t nr_free; @@ -43,7 +44,7 @@ struct pid_namespace { kgid_t pid_gid; int hide_pid; int reboot; /* group exit code if this pidns was rebooted */ - unsigned int proc_inum; + struct ns_common ns; }; extern struct pid_namespace init_pid_ns; diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h index e95372654f09..4cf06c140e21 100644 --- a/include/linux/user_namespace.h +++ b/include/linux/user_namespace.h @@ -3,6 +3,7 @@ #include <linux/kref.h> #include <linux/nsproxy.h> +#include <linux/ns_common.h> #include <linux/sched.h> #include <linux/err.h> @@ -26,7 +27,7 @@ struct user_namespace { int level; kuid_t owner; kgid_t group; - unsigned int proc_inum; + struct ns_common ns; /* Register of per-UID persistent keyrings for this namespace */ #ifdef CONFIG_PERSISTENT_KEYRINGS diff --git a/include/linux/utsname.h b/include/linux/utsname.h index 239e27733d6c..5093f58ae192 100644 --- a/include/linux/utsname.h +++ b/include/linux/utsname.h @@ -5,6 +5,7 @@ #include <linux/sched.h> #include <linux/kref.h> #include <linux/nsproxy.h> +#include <linux/ns_common.h> #include <linux/err.h> #include <uapi/linux/utsname.h> @@ -23,7 +24,7 @@ struct uts_namespace { struct kref kref; struct new_utsname name; struct user_namespace *user_ns; - unsigned int proc_inum; + struct ns_common ns; }; extern struct uts_namespace init_uts_ns; |