From 65e6757be42ddf0a9115ec0e6af268fec9727359 Mon Sep 17 00:00:00 2001 From: Kautuk Consul Date: Tue, 15 Nov 2011 14:52:34 -0800 Subject: [PATCH] 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 Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- drivers/base/devtmpfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/base/devtmpfs.c b/drivers/base/devtmpfs.c index a4760e0..2bb4bff 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: -- 2.7.4