diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2008-02-08 07:18:24 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-08 12:22:23 -0500 |
commit | 74bd59bb39eb08b4379e2590c5f160748d83f812 (patch) | |
tree | 2e0b8e18b0d51f9972239a0322aca313b325a8fa /include/linux | |
parent | aee16ce73c71a241190cef3aaa265f6a3ab8e035 (diff) |
namespaces: cleanup the code managed with PID_NS option
Just like with the user namespaces, move the namespace management code into
the separate .c file and mark the (already existing) PID_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 'include/linux')
-rw-r--r-- | include/linux/pid.h | 2 | ||||
-rw-r--r-- | include/linux/pid_namespace.h | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/pid.h b/include/linux/pid.h index e29a900a8499..061abb6c0796 100644 --- a/include/linux/pid.h +++ b/include/linux/pid.h | |||
@@ -118,10 +118,10 @@ extern struct pid *find_pid(int nr); | |||
118 | */ | 118 | */ |
119 | extern struct pid *find_get_pid(int nr); | 119 | extern struct pid *find_get_pid(int nr); |
120 | extern struct pid *find_ge_pid(int nr, struct pid_namespace *); | 120 | extern struct pid *find_ge_pid(int nr, struct pid_namespace *); |
121 | int next_pidmap(struct pid_namespace *pid_ns, int last); | ||
121 | 122 | ||
122 | extern struct pid *alloc_pid(struct pid_namespace *ns); | 123 | extern struct pid *alloc_pid(struct pid_namespace *ns); |
123 | extern void FASTCALL(free_pid(struct pid *pid)); | 124 | extern void FASTCALL(free_pid(struct pid *pid)); |
124 | extern void zap_pid_ns_processes(struct pid_namespace *pid_ns); | ||
125 | 125 | ||
126 | /* | 126 | /* |
127 | * the helpers to get the pid's id seen from different namespaces | 127 | * the helpers to get the pid's id seen from different namespaces |
diff --git a/include/linux/pid_namespace.h b/include/linux/pid_namespace.h index 1689e28483e4..fcd61fa2c833 100644 --- a/include/linux/pid_namespace.h +++ b/include/linux/pid_namespace.h | |||
@@ -39,6 +39,7 @@ static inline struct pid_namespace *get_pid_ns(struct pid_namespace *ns) | |||
39 | 39 | ||
40 | extern struct pid_namespace *copy_pid_ns(unsigned long flags, struct pid_namespace *ns); | 40 | extern struct pid_namespace *copy_pid_ns(unsigned long flags, struct pid_namespace *ns); |
41 | extern void free_pid_ns(struct kref *kref); | 41 | extern void free_pid_ns(struct kref *kref); |
42 | extern void zap_pid_ns_processes(struct pid_namespace *pid_ns); | ||
42 | 43 | ||
43 | static inline void put_pid_ns(struct pid_namespace *ns) | 44 | static inline void put_pid_ns(struct pid_namespace *ns) |
44 | { | 45 | { |
@@ -66,6 +67,11 @@ static inline void put_pid_ns(struct pid_namespace *ns) | |||
66 | { | 67 | { |
67 | } | 68 | } |
68 | 69 | ||
70 | |||
71 | static inline void zap_pid_ns_processes(struct pid_namespace *ns) | ||
72 | { | ||
73 | BUG(); | ||
74 | } | ||
69 | #endif /* CONFIG_PID_NS */ | 75 | #endif /* CONFIG_PID_NS */ |
70 | 76 | ||
71 | static inline struct pid_namespace *task_active_pid_ns(struct task_struct *tsk) | 77 | static inline struct pid_namespace *task_active_pid_ns(struct task_struct *tsk) |