aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid1.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/raid1.c')
-rw-r--r--drivers/md/raid1.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index 8034fbd6190c..a0f73092176e 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -963,7 +963,7 @@ static void raid1_unplug(struct blk_plug_cb *cb, bool from_schedule)
963 struct r1conf *conf = mddev->private; 963 struct r1conf *conf = mddev->private;
964 struct bio *bio; 964 struct bio *bio;
965 965
966 if (from_schedule) { 966 if (from_schedule || current->bio_list) {
967 spin_lock_irq(&conf->device_lock); 967 spin_lock_irq(&conf->device_lock);
968 bio_list_merge(&conf->pending_bio_list, &plug->pending); 968 bio_list_merge(&conf->pending_bio_list, &plug->pending);
969 conf->pending_count += plug->pending_cnt; 969 conf->pending_count += plug->pending_cnt;
@@ -2710,7 +2710,7 @@ static struct r1conf *setup_conf(struct mddev *mddev)
2710 || disk_idx < 0) 2710 || disk_idx < 0)
2711 continue; 2711 continue;
2712 if (test_bit(Replacement, &rdev->flags)) 2712 if (test_bit(Replacement, &rdev->flags))
2713 disk = conf->mirrors + conf->raid_disks + disk_idx; 2713 disk = conf->mirrors + mddev->raid_disks + disk_idx;
2714 else 2714 else
2715 disk = conf->mirrors + disk_idx; 2715 disk = conf->mirrors + disk_idx;
2716 2716