lkml.org 
[lkml]   [2014]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/5] ipc,msg: use current->state helpers
On 05/13/2014 10:27 PM, Davidlohr Bueso wrote:
> 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>

> ---
> ipc/msg.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/ipc/msg.c b/ipc/msg.c
> index 7ed1ef3..5a8489b 100644
> --- a/ipc/msg.c
> +++ b/ipc/msg.c
> @@ -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)
> {
> mss->tsk = current;
> - current->state = TASK_INTERRUPTIBLE;
> + __set_current_state(TASK_INTERRUPTIBLE);
> 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
> else
> msr_d.r_maxsize = bufsz;
> msr_d.r_msg = ERR_PTR(-EAGAIN);
> - current->state = TASK_INTERRUPTIBLE;
> + __set_current_state(TASK_INTERRUPTIBLE);
>
> ipc_unlock_object(&msq->q_perm);
> rcu_read_unlock();



\
 
 \ /
  Last update: 2014-05-17 20:21    [W:0.084 / U:6.716 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site