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 /kernel | |
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 'kernel')
-rw-r--r-- | kernel/pid.c | 2 | ||||
-rw-r--r-- | kernel/pid_namespace.c | 6 | ||||
-rw-r--r-- | kernel/user.c | 2 | ||||
-rw-r--r-- | kernel/user_namespace.c | 6 | ||||
-rw-r--r-- | kernel/utsname.c | 6 |
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 = { | |||
79 | .level = 0, | 79 | .level = 0, |
80 | .child_reaper = &init_task, | 80 | .child_reaper = &init_task, |
81 | .user_ns = &init_user_ns, | 81 | .user_ns = &init_user_ns, |
82 | .proc_inum = PROC_PID_INIT_INO, | 82 | .ns.inum = PROC_PID_INIT_INO, |
83 | }; | 83 | }; |
84 | EXPORT_SYMBOL_GPL(init_pid_ns); | 84 | EXPORT_SYMBOL_GPL(init_pid_ns); |
85 | 85 | ||
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 | |||
105 | if (ns->pid_cachep == NULL) | 105 | if (ns->pid_cachep == NULL) |
106 | goto out_free_map; | 106 | goto out_free_map; |
107 | 107 | ||
108 | err = proc_alloc_inum(&ns->proc_inum); | 108 | err = proc_alloc_inum(&ns->ns.inum); |
109 | if (err) | 109 | if (err) |
110 | goto out_free_map; | 110 | goto out_free_map; |
111 | 111 | ||
@@ -142,7 +142,7 @@ static void destroy_pid_namespace(struct pid_namespace *ns) | |||
142 | { | 142 | { |
143 | int i; | 143 | int i; |
144 | 144 | ||
145 | proc_free_inum(ns->proc_inum); | 145 | proc_free_inum(ns->ns.inum); |
146 | for (i = 0; i < PIDMAP_ENTRIES; i++) | 146 | for (i = 0; i < PIDMAP_ENTRIES; i++) |
147 | kfree(ns->pidmap[i].page); | 147 | kfree(ns->pidmap[i].page); |
148 | put_user_ns(ns->user_ns); | 148 | put_user_ns(ns->user_ns); |
@@ -365,7 +365,7 @@ static int pidns_install(struct nsproxy *nsproxy, void *ns) | |||
365 | static unsigned int pidns_inum(void *ns) | 365 | static unsigned int pidns_inum(void *ns) |
366 | { | 366 | { |
367 | struct pid_namespace *pid_ns = ns; | 367 | struct pid_namespace *pid_ns = ns; |
368 | return pid_ns->proc_inum; | 368 | return pid_ns->ns.inum; |
369 | } | 369 | } |
370 | 370 | ||
371 | const struct proc_ns_operations pidns_operations = { | 371 | 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 = { | |||
50 | .count = ATOMIC_INIT(3), | 50 | .count = ATOMIC_INIT(3), |
51 | .owner = GLOBAL_ROOT_UID, | 51 | .owner = GLOBAL_ROOT_UID, |
52 | .group = GLOBAL_ROOT_GID, | 52 | .group = GLOBAL_ROOT_GID, |
53 | .proc_inum = PROC_USER_INIT_INO, | 53 | .ns.inum = PROC_USER_INIT_INO, |
54 | #ifdef CONFIG_PERSISTENT_KEYRINGS | 54 | #ifdef CONFIG_PERSISTENT_KEYRINGS |
55 | .persistent_keyring_register_sem = | 55 | .persistent_keyring_register_sem = |
56 | __RWSEM_INITIALIZER(init_user_ns.persistent_keyring_register_sem), | 56 | __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) | |||
86 | if (!ns) | 86 | if (!ns) |
87 | return -ENOMEM; | 87 | return -ENOMEM; |
88 | 88 | ||
89 | ret = proc_alloc_inum(&ns->proc_inum); | 89 | ret = proc_alloc_inum(&ns->ns.inum); |
90 | if (ret) { | 90 | if (ret) { |
91 | kmem_cache_free(user_ns_cachep, ns); | 91 | kmem_cache_free(user_ns_cachep, ns); |
92 | return ret; | 92 | return ret; |
@@ -136,7 +136,7 @@ void free_user_ns(struct user_namespace *ns) | |||
136 | #ifdef CONFIG_PERSISTENT_KEYRINGS | 136 | #ifdef CONFIG_PERSISTENT_KEYRINGS |
137 | key_put(ns->persistent_keyring_register); | 137 | key_put(ns->persistent_keyring_register); |
138 | #endif | 138 | #endif |
139 | proc_free_inum(ns->proc_inum); | 139 | proc_free_inum(ns->ns.inum); |
140 | kmem_cache_free(user_ns_cachep, ns); | 140 | kmem_cache_free(user_ns_cachep, ns); |
141 | ns = parent; | 141 | ns = parent; |
142 | } while (atomic_dec_and_test(&parent->count)); | 142 | } while (atomic_dec_and_test(&parent->count)); |
@@ -891,7 +891,7 @@ static int userns_install(struct nsproxy *nsproxy, void *ns) | |||
891 | static unsigned int userns_inum(void *ns) | 891 | static unsigned int userns_inum(void *ns) |
892 | { | 892 | { |
893 | struct user_namespace *user_ns = ns; | 893 | struct user_namespace *user_ns = ns; |
894 | return user_ns->proc_inum; | 894 | return user_ns->ns.inum; |
895 | } | 895 | } |
896 | 896 | ||
897 | const struct proc_ns_operations userns_operations = { | 897 | 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, | |||
42 | if (!ns) | 42 | if (!ns) |
43 | return ERR_PTR(-ENOMEM); | 43 | return ERR_PTR(-ENOMEM); |
44 | 44 | ||
45 | err = proc_alloc_inum(&ns->proc_inum); | 45 | err = proc_alloc_inum(&ns->ns.inum); |
46 | if (err) { | 46 | if (err) { |
47 | kfree(ns); | 47 | kfree(ns); |
48 | return ERR_PTR(err); | 48 | return ERR_PTR(err); |
@@ -84,7 +84,7 @@ void free_uts_ns(struct kref *kref) | |||
84 | 84 | ||
85 | ns = container_of(kref, struct uts_namespace, kref); | 85 | ns = container_of(kref, struct uts_namespace, kref); |
86 | put_user_ns(ns->user_ns); | 86 | put_user_ns(ns->user_ns); |
87 | proc_free_inum(ns->proc_inum); | 87 | proc_free_inum(ns->ns.inum); |
88 | kfree(ns); | 88 | kfree(ns); |
89 | } | 89 | } |
90 | 90 | ||
@@ -127,7 +127,7 @@ static unsigned int utsns_inum(void *vp) | |||
127 | { | 127 | { |
128 | struct uts_namespace *ns = vp; | 128 | struct uts_namespace *ns = vp; |
129 | 129 | ||
130 | return ns->proc_inum; | 130 | return ns->ns.inum; |
131 | } | 131 | } |
132 | 132 | ||
133 | const struct proc_ns_operations utsns_operations = { | 133 | const struct proc_ns_operations utsns_operations = { |