diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2008-02-08 07:18:23 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-08 12:22:23 -0500 |
commit | aee16ce73c71a241190cef3aaa265f6a3ab8e035 (patch) | |
tree | ccfded2678d36af2d4ba9ad106240acf65173b28 /kernel/user_namespace.c | |
parent | ae5e1b22f17983da929a0d0178896269e19da186 (diff) |
namespaces: cleanup the code managed with the USER_NS option
Make the user_namespace.o compilation depend on this option and move the
init_user_ns into user.c file to make the kernel compile and work without the
namespaces support. This make the user namespace code be organized similar to
other namespaces'.
Also mask the USER_NS option as "depend on NAMESPACES".
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Cc: Cedric Le Goater <clg@fr.ibm.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Cc: Kirill Korotaev <dev@sw.ru>
Cc: Sukadev Bhattiprolu <sukadev@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/user_namespace.c')
-rw-r--r-- | kernel/user_namespace.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c index 7af90fc4f0f..4c9006275df 100644 --- a/kernel/user_namespace.c +++ b/kernel/user_namespace.c | |||
@@ -10,17 +10,6 @@ | |||
10 | #include <linux/nsproxy.h> | 10 | #include <linux/nsproxy.h> |
11 | #include <linux/user_namespace.h> | 11 | #include <linux/user_namespace.h> |
12 | 12 | ||
13 | struct user_namespace init_user_ns = { | ||
14 | .kref = { | ||
15 | .refcount = ATOMIC_INIT(2), | ||
16 | }, | ||
17 | .root_user = &root_user, | ||
18 | }; | ||
19 | |||
20 | EXPORT_SYMBOL_GPL(init_user_ns); | ||
21 | |||
22 | #ifdef CONFIG_USER_NS | ||
23 | |||
24 | /* | 13 | /* |
25 | * Clone a new ns copying an original user ns, setting refcount to 1 | 14 | * Clone a new ns copying an original user ns, setting refcount to 1 |
26 | * @old_ns: namespace to clone | 15 | * @old_ns: namespace to clone |
@@ -84,5 +73,3 @@ void free_user_ns(struct kref *kref) | |||
84 | release_uids(ns); | 73 | release_uids(ns); |
85 | kfree(ns); | 74 | kfree(ns); |
86 | } | 75 | } |
87 | |||
88 | #endif /* CONFIG_USER_NS */ | ||