staging/lustre/libcfs: Do not call kthread_run in wrong state
authorOleg Drokin <green@linuxhacker.ru>
Mon, 20 Jun 2016 20:55:51 +0000 (16:55 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Jun 2016 21:28:39 +0000 (14:28 -0700)
commit281a8273f6d8664b14c9164ff6d659049c43b3f0
tree9d333085c4044bd27f14c86dbf538dff125ddccc
parent025fd3c20bfb4e84972f174c7246f86d693f6544
staging/lustre/libcfs: Do not call kthread_run in wrong state

kthread_run might sleep during an allocation, and so
it's considered unsafe to call with a state that's not
RUNNABLE.
Move the state setting to after kthread_run call.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lnet/libcfs/debug.c