]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
devtmpfsd: fix task state handling
authorKautuk Consul <consul.kautuk@gmail.com>
Mon, 24 Oct 2011 14:53:39 +0000 (01:53 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 4 Nov 2011 04:48:09 +0000 (15:48 +1100)
- 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 - a call to schedule() always returns in
  TASK_RUNNING state.

Signed-off-by: Kautuk Consul <consul.kautuk@gmail.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/base/devtmpfs.c

index a4760e095ff51b36a58871cdf9329bf4573f6c1d..2bb4bff3af7d33f73424242d59f68972d5bf2b45 100644 (file)
@@ -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: