Commit 94d3d824 authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Ingo Molnar

sched: do_wait_for_common: use signal_pending_state()

Change do_wait_for_common() to use signal_pending_state() instead of open
coding.
Signed-off-by: default avatarOleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent f58e2c33
......@@ -4599,10 +4599,7 @@ do_wait_for_common(struct completion *x, long timeout, int state)
wait.flags |= WQ_FLAG_EXCLUSIVE;
__add_wait_queue_tail(&x->wait, &wait);
do {
if ((state == TASK_INTERRUPTIBLE &&
signal_pending(current)) ||
(state == TASK_KILLABLE &&
fatal_signal_pending(current))) {
if (signal_pending_state(state, current)) {
timeout = -ERESTARTSYS;
break;
}
......
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