diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-10-27 20:35:17 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-10-27 20:35:17 -0400 |
commit | b2ab040db85835e54c7559533df7f85902617926 (patch) | |
tree | b23cbdca55935c497cb88b588e4e8b088d6ab7ab /drivers/md/md.c | |
parent | 1f57389a38dc1e8be167ec601f39f78f0bed3a96 (diff) | |
parent | 741b2252a5e14d6c60a913c77a6099abe73a854a (diff) | |
download | kernel_samsung_aries-b2ab040db85835e54c7559533df7f85902617926.zip kernel_samsung_aries-b2ab040db85835e54c7559533df7f85902617926.tar.gz kernel_samsung_aries-b2ab040db85835e54c7559533df7f85902617926.tar.bz2 |
Merge branch 'master'
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r-- | drivers/md/md.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index e947607..2a8a569 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -3568,7 +3568,8 @@ static void md_do_sync(mddev_t *mddev) mddev->curr_resync = 2; try_again: - if (signal_pending(current)) { + if (signal_pending(current) || + kthread_should_stop()) { flush_signals(current); set_bit(MD_RECOVERY_INTR, &mddev->recovery); goto skip; @@ -3590,8 +3591,9 @@ static void md_do_sync(mddev_t *mddev) */ continue; prepare_to_wait(&resync_wait, &wq, TASK_INTERRUPTIBLE); - if (!signal_pending(current) - && mddev2->curr_resync >= mddev->curr_resync) { + if (!signal_pending(current) && + !kthread_should_stop() && + mddev2->curr_resync >= mddev->curr_resync) { printk(KERN_INFO "md: delaying resync of %s" " until %s has finished resync (they" " share one or more physical units)\n", @@ -3697,7 +3699,7 @@ static void md_do_sync(mddev_t *mddev) } - if (signal_pending(current)) { + if (signal_pending(current) || kthread_should_stop()) { /* * got a signal, exit. */ |