diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2005-10-27 19:12:49 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2005-10-27 19:12:49 -0400 |
commit | 4c2cb58c552a34744979a99ccf01762d5eb7e288 (patch) | |
tree | fd35360eb0cb08b07f3a5f4bdf1ebd90a769311d /drivers/md/md.c | |
parent | 34123da66e613602de5a886b05c875b6a91b8ed2 (diff) | |
parent | 72ab373a5688a78cbdaf3bf96012e597d5399bb7 (diff) | |
download | blackbird-op-linux-4c2cb58c552a34744979a99ccf01762d5eb7e288.tar.gz blackbird-op-linux-4c2cb58c552a34744979a99ccf01762d5eb7e288.zip |
Merge /home/trondmy/scm/kernel/git/torvalds/linux-2.6
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. */ |