diff options
author | Paul Mackerras <paulus@samba.org> | 2005-10-28 13:38:53 +1000 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-10-28 13:38:53 +1000 |
commit | 4542437679de448de0f75bc901dab380d6a5bc5b (patch) | |
tree | 1a436c9b6f9459c3938e2bb1ab7ad2c888d0003c /drivers/md/md.c | |
parent | 2227718ca2f7d5fcc2741c1bbca4d0c2efd340ce (diff) | |
parent | 741b2252a5e14d6c60a913c77a6099abe73a854a (diff) | |
download | blackbird-op-linux-4542437679de448de0f75bc901dab380d6a5bc5b.tar.gz blackbird-op-linux-4542437679de448de0f75bc901dab380d6a5bc5b.zip |
Merge in v2.6.14 by hand
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 e9476075aa13..2a8a5696bf8a 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. */ |