diff --git a/[refs] b/[refs] index 38463a46f8f5..16f79f66f1a7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e8a0033451f7972169b2f375be34d9d805ad8687 +refs/heads/master: 93588e2284b6be1873cc0bb7fbf0947bdbf72830 diff --git a/trunk/drivers/md/md.c b/trunk/drivers/md/md.c index a9f032e341cb..f3fed662f32e 100644 --- a/trunk/drivers/md/md.c +++ b/trunk/drivers/md/md.c @@ -3437,10 +3437,19 @@ static int md_thread(void * arg) allow_signal(SIGKILL); while (!kthread_should_stop()) { - wait_event_timeout(thread->wqueue, - test_bit(THREAD_WAKEUP, &thread->flags) - || kthread_should_stop(), - thread->timeout); + /* We need to wait INTERRUPTIBLE so that + * we don't add to the load-average. + * That means we need to be sure no signals are + * pending + */ + if (signal_pending(current)) + flush_signals(current); + + wait_event_interruptible_timeout + (thread->wqueue, + test_bit(THREAD_WAKEUP, &thread->flags) + || kthread_should_stop(), + thread->timeout); try_to_freeze(); clear_bit(THREAD_WAKEUP, &thread->flags);