diff options
author | Davidlohr Bueso <dave@stgolabs.net> | 2015-02-17 16:47:55 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-17 17:34:55 -0500 |
commit | 52644c9ab3faefbfbf07a19c24c4e74e33cfd796 (patch) | |
tree | 655044797aac54d771597565ca424acad1e2dec5 /ipc | |
parent | a9c5bcfa43420365535ef42c1ff1e83aa056f25e (diff) |
ipc,sem: use current->state helpers
Call __set_current_state() instead of assigning the new state directly.
These interfaces also aid CONFIG_DEBUG_ATOMIC_SLEEP environments, keeping
track of who changed the state.
Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/sem.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1941,7 +1941,7 @@ SYSCALL_DEFINE4(semtimedop, int, semid, struct sembuf __user *, tsops, | |||
1941 | queue.sleeper = current; | 1941 | queue.sleeper = current; |
1942 | 1942 | ||
1943 | sleep_again: | 1943 | sleep_again: |
1944 | current->state = TASK_INTERRUPTIBLE; | 1944 | __set_current_state(TASK_INTERRUPTIBLE); |
1945 | sem_unlock(sma, locknum); | 1945 | sem_unlock(sma, locknum); |
1946 | rcu_read_unlock(); | 1946 | rcu_read_unlock(); |
1947 | 1947 | ||