lkml.org 
[lkml]   [2011]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/1] Trivial: devtmpfsd: Setting task running/interruptible states
Date
This trivial patch makes the following changes in devtmpfsd() :
- 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 as the wake_up_process() function call will
do this for us.

Signed-off-by: Kautuk Consul <consul.kautuk@gmail.com>
---
drivers/base/devtmpfs.c | 3 +--
1 files changed, 1 insertions(+), 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:
--
1.7.4.1


\
 
 \ /
  Last update: 2011-09-21 17:43    [W:0.037 / U:3.804 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site