summaryrefslogtreecommitdiff
path: root/drivers/base/devtmpfs.c
diff options
context:
space:
mode:
authorKautuk Consul <consul.kautuk@gmail.com>2011-11-15 14:52:34 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2011-11-15 16:07:39 -0800
commit65e6757be42ddf0a9115ec0e6af268fec9727359 (patch)
tree78d757c6cad66bb9daf0c3136d5e92a15edb8432 /drivers/base/devtmpfs.c
parent72f8c0bfa0de64c68ee59f40eb9b2683bffffbb0 (diff)
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 <consul.kautuk@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/base/devtmpfs.c')
-rw-r--r--drivers/base/devtmpfs.c3
1 files changed, 1 insertions, 2 deletions
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: