aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/md.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r--drivers/md/md.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 8cfadc5bd2ba..deeac4b44173 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -3841,8 +3841,6 @@ static int do_md_stop(mddev_t * mddev, int mode, int is_open)
3841 3841
3842 del_timer_sync(&mddev->safemode_timer); 3842 del_timer_sync(&mddev->safemode_timer);
3843 3843
3844 invalidate_partition(disk, 0);
3845
3846 switch(mode) { 3844 switch(mode) {
3847 case 1: /* readonly */ 3845 case 1: /* readonly */
3848 err = -ENXIO; 3846 err = -ENXIO;
@@ -5763,7 +5761,11 @@ void md_do_sync(mddev_t *mddev)
5763 * time 'round when curr_resync == 2 5761 * time 'round when curr_resync == 2
5764 */ 5762 */
5765 continue; 5763 continue;
5766 prepare_to_wait(&resync_wait, &wq, TASK_UNINTERRUPTIBLE); 5764 /* We need to wait 'interruptible' so as not to
5765 * contribute to the load average, and not to
5766 * be caught by 'softlockup'
5767 */
5768 prepare_to_wait(&resync_wait, &wq, TASK_INTERRUPTIBLE);
5767 if (!kthread_should_stop() && 5769 if (!kthread_should_stop() &&
5768 mddev2->curr_resync >= mddev->curr_resync) { 5770 mddev2->curr_resync >= mddev->curr_resync) {
5769 printk(KERN_INFO "md: delaying %s of %s" 5771 printk(KERN_INFO "md: delaying %s of %s"
@@ -5771,6 +5773,8 @@ void md_do_sync(mddev_t *mddev)
5771 " share one or more physical units)\n", 5773 " share one or more physical units)\n",
5772 desc, mdname(mddev), mdname(mddev2)); 5774 desc, mdname(mddev), mdname(mddev2));
5773 mddev_put(mddev2); 5775 mddev_put(mddev2);
5776 if (signal_pending(current))
5777 flush_signals(current);
5774 schedule(); 5778 schedule();
5775 finish_wait(&resync_wait, &wq); 5779 finish_wait(&resync_wait, &wq);
5776 goto try_again; 5780 goto try_again;