diff options
Diffstat (limited to 'kernel/pid.c')
-rw-r--r-- | kernel/pid.c | 11 |
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 | } |
361 | EXPORT_SYMBOL_GPL(find_get_pid); | 361 | EXPORT_SYMBOL_GPL(find_get_pid); |
362 | 362 | ||
363 | int copy_pid_ns(int flags, struct task_struct *tsk) | 363 | struct 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 | ||
375 | void free_pid_ns(struct kref *kref) | 370 | void free_pid_ns(struct kref *kref) |