From: Kautuk Consul Date: Mon, 24 Oct 2011 14:53:39 +0000 (+1100) Subject: devtmpfsd: fix task state handling X-Git-Tag: next-20111104~1^2~83 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=896afc0d63b4557d94cd0259f2be11bae2da5587;p=karo-tx-linux.git devtmpfsd: fix task state handling - Set the state to TASK_INTERRUPTIBLE using __set_current_state() instead of set_current_state() as the spin_unlock is an implicit memory barrier. - After return from schedule(), there is no need to set the current state to TASK_RUNNING - a call to schedule() always returns in TASK_RUNNING state. Signed-off-by: Kautuk Consul Cc: Greg KH Signed-off-by: Andrew Morton --- diff --git a/drivers/base/devtmpfs.c b/drivers/base/devtmpfs.c index a4760e095ff5..2bb4bff3af7d 100644 --- a/drivers/base/devtmpfs.c +++ b/drivers/base/devtmpfs.c @@ -413,10 +413,9 @@ static int devtmpfsd(void *p) } spin_lock(&req_lock); } - set_current_state(TASK_INTERRUPTIBLE); + __set_current_state(TASK_INTERRUPTIBLE); spin_unlock(&req_lock); schedule(); - __set_current_state(TASK_RUNNING); } return 0; out: