aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/pid.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/pid.c')
-rw-r--r--kernel/pid.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/kernel/pid.c b/kernel/pid.c
index 9c80bc23d6b8..d3ad724afa83 100644
--- a/kernel/pid.c
+++ b/kernel/pid.c
@@ -360,16 +360,11 @@ struct pid *find_ge_pid(int nr)
360} 360}
361EXPORT_SYMBOL_GPL(find_get_pid); 361EXPORT_SYMBOL_GPL(find_get_pid);
362 362
363int copy_pid_ns(int flags, struct task_struct *tsk) 363struct pid_namespace *copy_pid_ns(int flags, struct pid_namespace *old_ns)
364{ 364{
365 struct pid_namespace *old_ns = tsk->nsproxy->pid_ns; 365 BUG_ON(!old_ns);
366 int err = 0;
367
368 if (!old_ns)
369 return 0;
370
371 get_pid_ns(old_ns); 366 get_pid_ns(old_ns);
372 return err; 367 return old_ns;
373} 368}
374 369
375void free_pid_ns(struct kref *kref) 370void free_pid_ns(struct kref *kref)