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>
diff --git a/kernel/pid.c b/kernel/pid.c
index 9b9a266..3650698 100644
--- a/kernel/pid.c
+++ b/kernel/pid.c
@@ -79,7 +79,7 @@
.level = 0,
.child_reaper = &init_task,
.user_ns = &init_user_ns,
- .proc_inum = PROC_PID_INIT_INO,
+ .ns.inum = PROC_PID_INIT_INO,
};
EXPORT_SYMBOL_GPL(init_pid_ns);
diff --git a/kernel/pid_namespace.c b/kernel/pid_namespace.c
index db95d8e..99e27e5 100644
--- a/kernel/pid_namespace.c
+++ b/kernel/pid_namespace.c
@@ -105,7 +105,7 @@
if (ns->pid_cachep == NULL)
goto out_free_map;
- err = proc_alloc_inum(&ns->proc_inum);
+ err = proc_alloc_inum(&ns->ns.inum);
if (err)
goto out_free_map;
@@ -142,7 +142,7 @@
{
int i;
- proc_free_inum(ns->proc_inum);
+ proc_free_inum(ns->ns.inum);
for (i = 0; i < PIDMAP_ENTRIES; i++)
kfree(ns->pidmap[i].page);
put_user_ns(ns->user_ns);
@@ -365,7 +365,7 @@
static unsigned int pidns_inum(void *ns)
{
struct pid_namespace *pid_ns = ns;
- return pid_ns->proc_inum;
+ return pid_ns->ns.inum;
}
const struct proc_ns_operations pidns_operations = {
diff --git a/kernel/user.c b/kernel/user.c
index 4efa393..a7ca84b 100644
--- a/kernel/user.c
+++ b/kernel/user.c
@@ -50,7 +50,7 @@
.count = ATOMIC_INIT(3),
.owner = GLOBAL_ROOT_UID,
.group = GLOBAL_ROOT_GID,
- .proc_inum = PROC_USER_INIT_INO,
+ .ns.inum = PROC_USER_INIT_INO,
#ifdef CONFIG_PERSISTENT_KEYRINGS
.persistent_keyring_register_sem =
__RWSEM_INITIALIZER(init_user_ns.persistent_keyring_register_sem),
diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c
index aa312b0..fde5840 100644
--- a/kernel/user_namespace.c
+++ b/kernel/user_namespace.c
@@ -86,7 +86,7 @@
if (!ns)
return -ENOMEM;
- ret = proc_alloc_inum(&ns->proc_inum);
+ ret = proc_alloc_inum(&ns->ns.inum);
if (ret) {
kmem_cache_free(user_ns_cachep, ns);
return ret;
@@ -136,7 +136,7 @@
#ifdef CONFIG_PERSISTENT_KEYRINGS
key_put(ns->persistent_keyring_register);
#endif
- proc_free_inum(ns->proc_inum);
+ proc_free_inum(ns->ns.inum);
kmem_cache_free(user_ns_cachep, ns);
ns = parent;
} while (atomic_dec_and_test(&parent->count));
@@ -891,7 +891,7 @@
static unsigned int userns_inum(void *ns)
{
struct user_namespace *user_ns = ns;
- return user_ns->proc_inum;
+ return user_ns->ns.inum;
}
const struct proc_ns_operations userns_operations = {
diff --git a/kernel/utsname.c b/kernel/utsname.c
index 883aaaa..b1cd00b 100644
--- a/kernel/utsname.c
+++ b/kernel/utsname.c
@@ -42,7 +42,7 @@
if (!ns)
return ERR_PTR(-ENOMEM);
- err = proc_alloc_inum(&ns->proc_inum);
+ err = proc_alloc_inum(&ns->ns.inum);
if (err) {
kfree(ns);
return ERR_PTR(err);
@@ -84,7 +84,7 @@
ns = container_of(kref, struct uts_namespace, kref);
put_user_ns(ns->user_ns);
- proc_free_inum(ns->proc_inum);
+ proc_free_inum(ns->ns.inum);
kfree(ns);
}
@@ -127,7 +127,7 @@
{
struct uts_namespace *ns = vp;
- return ns->proc_inum;
+ return ns->ns.inum;
}
const struct proc_ns_operations utsns_operations = {