linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] Trivial: devtmpfsd: Setting task running/interruptible states
@ 2011-09-21 15:39 Kautuk Consul
  2011-09-21 15:54 ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Kautuk Consul @ 2011-09-21 15:39 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Jiri Kosina, jkosina; +Cc: linux-kernel, Kautuk Consul

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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-09-22  3:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-21 15:39 [PATCH 1/1] Trivial: devtmpfsd: Setting task running/interruptible states Kautuk Consul
2011-09-21 15:54 ` Greg KH
2011-09-21 16:24   ` kautuk.c @samsung.com
2011-09-21 21:10     ` Greg KH
2011-09-22  3:25       ` kautuk.c @samsung.com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).