[PATCH 1/1] Trivial: devtmpfsd: Setting task running/interruptible states

From: Kautuk Consul
Date: Wed Sep 21 2011 - 11:40:12 EST


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@xxxxxxxxx>
---
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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/