Commit f75a2f35 authored by Davidlohr Bueso's avatar Davidlohr Bueso Committed by Linus Torvalds

ipc,msg: use current->state helpers

Call __set_current_state() instead of assigning the new state directly.
Signed-off-by: default avatarDavidlohr Bueso <davidlohr@hp.com>
Signed-off-by: default avatarManfred Spraul <manfred@colorfullif.com>
Cc: Aswin Chandramouleeswaran <aswin@hp.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent f57a19a7
...@@ -227,7 +227,7 @@ static int newque(struct ipc_namespace *ns, struct ipc_params *params) ...@@ -227,7 +227,7 @@ static int newque(struct ipc_namespace *ns, struct ipc_params *params)
static inline void ss_add(struct msg_queue *msq, struct msg_sender *mss) static inline void ss_add(struct msg_queue *msq, struct msg_sender *mss)
{ {
mss->tsk = current; mss->tsk = current;
current->state = TASK_INTERRUPTIBLE; __set_current_state(TASK_INTERRUPTIBLE);
list_add_tail(&mss->list, &msq->q_senders); list_add_tail(&mss->list, &msq->q_senders);
} }
...@@ -976,7 +976,7 @@ long do_msgrcv(int msqid, void __user *buf, size_t bufsz, long msgtyp, int msgfl ...@@ -976,7 +976,7 @@ long do_msgrcv(int msqid, void __user *buf, size_t bufsz, long msgtyp, int msgfl
else else
msr_d.r_maxsize = bufsz; msr_d.r_maxsize = bufsz;
msr_d.r_msg = ERR_PTR(-EAGAIN); msr_d.r_msg = ERR_PTR(-EAGAIN);
current->state = TASK_INTERRUPTIBLE; __set_current_state(TASK_INTERRUPTIBLE);
ipc_unlock_object(&msq->q_perm); ipc_unlock_object(&msq->q_perm);
rcu_read_unlock(); rcu_read_unlock();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment