diff options
author | Davidlohr Bueso <davidlohr@hp.com> | 2014-06-06 17:37:44 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-06 19:08:14 -0400 |
commit | f75a2f358d840e99212b1828b131e8fe8629ac43 (patch) | |
tree | 4bb98f5f7fa79500ab7620b10fe555a1e8433ceb /ipc/msg.c | |
parent | f57a19a7bcd9d1b4b539daad5acd12ba663812b5 (diff) |
ipc,msg: use current->state helpers
Call __set_current_state() instead of assigning the new state directly.
Signed-off-by: Davidlohr Bueso <davidlohr@hp.com>
Signed-off-by: Manfred Spraul <manfred@colorfullif.com>
Cc: Aswin Chandramouleeswaran <aswin@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'ipc/msg.c')
-rw-r--r-- | ipc/msg.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -227,7 +227,7 @@ static int newque(struct ipc_namespace *ns, struct ipc_params *params) | |||
227 | static inline void ss_add(struct msg_queue *msq, struct msg_sender *mss) | 227 | static inline void ss_add(struct msg_queue *msq, struct msg_sender *mss) |
228 | { | 228 | { |
229 | mss->tsk = current; | 229 | mss->tsk = current; |
230 | current->state = TASK_INTERRUPTIBLE; | 230 | __set_current_state(TASK_INTERRUPTIBLE); |
231 | list_add_tail(&mss->list, &msq->q_senders); | 231 | list_add_tail(&mss->list, &msq->q_senders); |
232 | } | 232 | } |
233 | 233 | ||
@@ -976,7 +976,7 @@ long do_msgrcv(int msqid, void __user *buf, size_t bufsz, long msgtyp, int msgfl | |||
976 | else | 976 | else |
977 | msr_d.r_maxsize = bufsz; | 977 | msr_d.r_maxsize = bufsz; |
978 | msr_d.r_msg = ERR_PTR(-EAGAIN); | 978 | msr_d.r_msg = ERR_PTR(-EAGAIN); |
979 | current->state = TASK_INTERRUPTIBLE; | 979 | __set_current_state(TASK_INTERRUPTIBLE); |
980 | 980 | ||
981 | ipc_unlock_object(&msq->q_perm); | 981 | ipc_unlock_object(&msq->q_perm); |
982 | rcu_read_unlock(); | 982 | rcu_read_unlock(); |