summaryrefslogtreecommitdiffstats
path: root/drivers/block/md.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/md.c')
-rw-r--r--drivers/block/md.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/block/md.c b/drivers/block/md.c
index 2018883ca..039e7919c 100644
--- a/drivers/block/md.c
+++ b/drivers/block/md.c
@@ -987,9 +987,11 @@ int md_thread(void * arg)
cli();
if (!test_bit(THREAD_WAKEUP, &thread->flags)) {
do {
- current->signal = 0;
- interruptible_sleep_on(&thread->wqueue);
- } while (current->signal);
+ spin_lock_irq(&current->sigmask_lock);
+ flush_signals(current);
+ spin_unlock_irq(&current->sigmask_lock);
+ interruptible_sleep_on(&thread->wqueue);
+ } while (signal_pending(current));
}
}
}