summaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@tv-sign.ru>2008-08-20 16:54:41 -0700
committerIngo Molnar <mingo@elte.hu>2008-08-22 15:17:28 +0200
commit94d3d8247de22c5b0624aa00616ceca459498e55 (patch)
treea01dedc8fb47010b27107c0a13ef0e926cc82589 /kernel/sched.c
parentf58e2c33ffa31b8d4a71609a5e71e8d893574a07 (diff)
downloadlinux-94d3d8247de22c5b0624aa00616ceca459498e55.tar.bz2
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: Oleg Nesterov <oleg@tv-sign.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index d601fb0406ca..da7c5d23cc03 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -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;
}