[PATCH] slip.c: current state cleanup

From: Felipe W Damasio (felipewd@terra.com.br)
Date: Wed Sep 10 2003 - 08:07:20 EST


Hi Jeff,

Patch against 2.6-test5.

Removes current->state = TASK_RUNNING after calling schedule_timeout, which already guarantees that the task will be TASK_RUNNING.

Also (but I'm not about this one) adds a set_current_state with a memory barrier before calling schedule_timeout.

Please review this last bit and applies if it looks good.

Thanks,

Felipe --- linux-2.6.0-test5-fwd/drivers/net/slip.c Mon Sep 8 16:50:58 2003
+++ linux-2.6.0-test5/drivers/net/slip.c Wed Sep 10 09:45:48 2003
@@ -1389,9 +1389,8 @@
*/
do {
if (busy) {
- current->state = TASK_INTERRUPTIBLE;
+ set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(HZ / 10);
- current->state = TASK_RUNNING;
}

busy = 0;