diff options
author | Davidlohr Bueso <dave@stgolabs.net> | 2015-01-26 08:36:04 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-02-04 07:57:39 +0100 |
commit | 73105994c57d06e40a33ab5a716db04e898b4c05 (patch) | |
tree | 70eb647de1b7435ed58ee54c8ee79c7a8ccfb010 /kernel/locking/rwsem-spinlock.c | |
parent | sched/completion: Add lock-free checking of the blocking case (diff) | |
download | linux-73105994c57d06e40a33ab5a716db04e898b4c05.tar.xz linux-73105994c57d06e40a33ab5a716db04e898b4c05.zip |
locking/rwsem: Use task->state helpers
Call __set_task_state() instead of assigning the new state
directly. These interfaces also aid CONFIG_DEBUG_ATOMIC_SLEEP
environments, keeping track of who last changed the state.
Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Jason Low <jason.low2@hp.com>
Cc: Michel Lespinasse <walken@google.com>
Cc: Tim Chen <tim.c.chen@linux.intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/1422257769-14083-2-git-send-email-dave@stgolabs.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/locking/rwsem-spinlock.c')
-rw-r--r-- | kernel/locking/rwsem-spinlock.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/locking/rwsem-spinlock.c b/kernel/locking/rwsem-spinlock.c index 2c93571162cb..2555ae15ec14 100644 --- a/kernel/locking/rwsem-spinlock.c +++ b/kernel/locking/rwsem-spinlock.c @@ -154,7 +154,7 @@ void __sched __down_read(struct rw_semaphore *sem) set_task_state(tsk, TASK_UNINTERRUPTIBLE); } - tsk->state = TASK_RUNNING; + __set_task_state(tsk, TASK_RUNNING); out: ; } |