Pidns: make full use of xxx_vnr() calls
[linux-2.6-block.git] / kernel / fork.c
index ca54d9704644ba2d8acaee195c58faab4ace54d3..31a2bad63a0823189f0f5940595970c4a54e0c34 100644 (file)
@@ -1488,13 +1488,7 @@ long do_fork(unsigned long clone_flags,
        if (!IS_ERR(p)) {
                struct completion vfork;
 
-               /*
-                * this is enough to call pid_nr_ns here, but this if
-                * improves optimisation of regular fork()
-                */
-               nr = (clone_flags & CLONE_NEWPID) ?
-                       task_pid_nr_ns(p, current->nsproxy->pid_ns) :
-                               task_pid_vnr(p);
+               nr = task_pid_vnr(p);
 
                if (clone_flags & CLONE_PARENT_SETTID)
                        put_user(nr, parent_tidptr);