pidns: Use task_active_pid_ns where appropriate
The expressions tsk->nsproxy->pid_ns and task_active_pid_ns
aka ns_of_pid(task_pid(tsk)) should have the same number of
cache line misses with the practical difference that
ns_of_pid(task_pid(tsk)) is released later in a processes life.
Furthermore by using task_active_pid_ns it becomes trivial
to write an unshare implementation for the the pid namespace.
So I have used task_active_pid_ns everywhere I can.
In fork since the pid has not yet been attached to the
process I use ns_of_pid, to achieve the same effect.
Signed-off-by:
Eric W. Biederman <ebiederm@xmission.com>
Showing
- arch/powerpc/platforms/cell/spufs/sched.c 1 addition, 1 deletionarch/powerpc/platforms/cell/spufs/sched.c
- arch/um/drivers/mconsole_kern.c 1 addition, 1 deletionarch/um/drivers/mconsole_kern.c
- drivers/staging/android/binder.c 2 additions, 1 deletiondrivers/staging/android/binder.c
- fs/hppfs/hppfs.c 1 addition, 1 deletionfs/hppfs/hppfs.c
- fs/proc/root.c 1 addition, 1 deletionfs/proc/root.c
- kernel/cgroup.c 1 addition, 1 deletionkernel/cgroup.c
- kernel/events/core.c 1 addition, 1 deletionkernel/events/core.c
- kernel/fork.c 1 addition, 1 deletionkernel/fork.c
- kernel/nsproxy.c 1 addition, 1 deletionkernel/nsproxy.c
- kernel/pid.c 4 additions, 4 deletionskernel/pid.c
- kernel/signal.c 1 addition, 1 deletionkernel/signal.c
- kernel/sysctl_binary.c 1 addition, 1 deletionkernel/sysctl_binary.c
Please register or sign in to comment