[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1316619573-9104-1-git-send-email-consul.kautuk@gmail.com>
Date: Wed, 21 Sep 2011 21:09:33 +0530
From: Kautuk Consul <consul.kautuk@...il.com>
To: Greg Kroah-Hartman <gregkh@...e.de>,
Jiri Kosina <trivial@...nel.org>, jkosina@...e.cz
Cc: linux-kernel@...r.kernel.org,
Kautuk Consul <consul.kautuk@...il.com>
Subject: [PATCH 1/1] Trivial: devtmpfsd: Setting task running/interruptible states
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@...il.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists