Merge sys_clone()/sys_unshare() nsproxy and namespace handling
[linux-2.6.git] / kernel / pid.c
index 9c80bc2..d3ad724 100644 (file)
@@ -360,16 +360,11 @@ struct pid *find_ge_pid(int nr)
 }
 EXPORT_SYMBOL_GPL(find_get_pid);
 
-int copy_pid_ns(int flags, struct task_struct *tsk)
+struct pid_namespace *copy_pid_ns(int flags, struct pid_namespace *old_ns)
 {
-       struct pid_namespace *old_ns = tsk->nsproxy->pid_ns;
-       int err = 0;
-
-       if (!old_ns)
-               return 0;
-
+       BUG_ON(!old_ns);
        get_pid_ns(old_ns);
-       return err;
+       return old_ns;
 }
 
 void free_pid_ns(struct kref *kref)