summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2014-10-31 22:56:04 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2014-12-04 14:31:00 -0500
commit435d5f4bb2ccba3b791d9ef61d2590e30b8e806e (patch)
treed482ef15334a703bbe406dab021880ce3d320870 /kernel
parentcac7f2429872d3733dc3f9915857b1691da2eb2f (diff)
downloadlinux-435d5f4bb2ccba3b791d9ef61d2590e30b8e806e.tar.gz
linux-435d5f4bb2ccba3b791d9ef61d2590e30b8e806e.tar.bz2
linux-435d5f4bb2ccba3b791d9ef61d2590e30b8e806e.zip
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 'kernel')
-rw-r--r--kernel/pid.c2
-rw-r--r--kernel/pid_namespace.c6
-rw-r--r--kernel/user.c2
-rw-r--r--kernel/user_namespace.c6
-rw-r--r--kernel/utsname.c6
5 files changed, 11 insertions, 11 deletions
diff --git a/kernel/pid.c b/kernel/pid.c
index 9b9a26698144..3650698cf1dc 100644
--- a/kernel/pid.c
+++ b/kernel/pid.c
@@ -79,7 +79,7 @@ struct pid_namespace init_pid_ns = {
.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 db95d8eb761b..99e27e5bf906 100644
--- a/kernel/pid_namespace.c
+++ b/kernel/pid_namespace.c
@@ -105,7 +105,7 @@ static struct pid_namespace *create_pid_namespace(struct user_namespace *user_ns
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 @@ static void destroy_pid_namespace(struct pid_namespace *ns)
{
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 int pidns_install(struct nsproxy *nsproxy, void *ns)
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 4efa39350e44..a7ca84bad8e6 100644
--- a/kernel/user.c
+++ b/kernel/user.c
@@ -50,7 +50,7 @@ struct user_namespace init_user_ns = {
.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 aa312b0dc3ec..fde584082673 100644
--- a/kernel/user_namespace.c
+++ b/kernel/user_namespace.c
@@ -86,7 +86,7 @@ int create_user_ns(struct cred *new)
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 @@ void free_user_ns(struct user_namespace *ns)
#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 int userns_install(struct nsproxy *nsproxy, void *ns)
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 883aaaa7de8a..b1cd00b828f2 100644
--- a/kernel/utsname.c
+++ b/kernel/utsname.c
@@ -42,7 +42,7 @@ static struct uts_namespace *clone_uts_ns(struct user_namespace *user_ns,
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 @@ void free_uts_ns(struct kref *kref)
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 @@ static unsigned int utsns_inum(void *vp)
{
struct uts_namespace *ns = vp;
- return ns->proc_inum;
+ return ns->ns.inum;
}
const struct proc_ns_operations utsns_operations = {