linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kautuk Consul <consul.kautuk@gmail.com>
To: Greg Kroah-Hartman <gregkh@suse.de>,
	Jiri Kosina <trivial@kernel.org>,
	jkosina@suse.cz
Cc: linux-kernel@vger.kernel.org, Kautuk Consul <consul.kautuk@gmail.com>
Subject: [PATCH 1/1] Trivial: devtmpfsd: Setting task running/interruptible states
Date: Wed, 21 Sep 2011 21:09:33 +0530	[thread overview]
Message-ID: <1316619573-9104-1-git-send-email-consul.kautuk@gmail.com> (raw)

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


             reply	other threads:[~2011-09-21 15:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-21 15:39 Kautuk Consul [this message]
2011-09-21 15:54 ` [PATCH 1/1] Trivial: devtmpfsd: Setting task running/interruptible states 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1316619573-9104-1-git-send-email-consul.kautuk@gmail.com \
    --to=consul.kautuk@gmail.com \
    --cc=gregkh@suse.de \
    --cc=jkosina@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trivial@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).