summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2013-04-30 00:05:01 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-30 00:54:25 +0200
commit4ecdafc8084fe1d95bb59ed7753b345abcd586fb (patch)
treeb119ed319cfb2f526ac5666f04bef7e13caecd3c /lib
parentMerge tag 'usb-3.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gre... (diff)
downloadlinux-4ecdafc8084fe1d95bb59ed7753b345abcd586fb.tar.xz
linux-4ecdafc8084fe1d95bb59ed7753b345abcd586fb.zip
kthread: introduce to_live_kthread()
"k->vfork_done != NULL" with a barrier() after to_kthread(k) in task_get_live_kthread(k) looks unclear, and sub-optimal because we load ->vfork_done twice. All we need is to ensure that we do not return to_kthread(NULL). Add a new trivial helper which loads/checks ->vfork_done once, this also looks more understandable. Signed-off-by: Oleg Nesterov <oleg@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Namhyung Kim <namhyung@kernel.org> Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com> Cc: Tejun Heo <tj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions