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, 3 insertions, 1 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index b34ad56362df..3f1280bbaf39 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -530,6 +530,8 @@ static int make_request(request_queue_t *q, struct bio * bio)
530 * thread has put up a bar for new requests. 530 * thread has put up a bar for new requests.
531 * Continue immediately if no resync is active currently. 531 * Continue immediately if no resync is active currently.
532 */ 532 */
533 if (md_write_start(mddev, bio)==0)
534 return 0;
533 spin_lock_irq(&conf->resync_lock); 535 spin_lock_irq(&conf->resync_lock);
534 wait_event_lock_irq(conf->wait_resume, !conf->barrier, conf->resync_lock, ); 536 wait_event_lock_irq(conf->wait_resume, !conf->barrier, conf->resync_lock, );
535 conf->nr_pending++; 537 conf->nr_pending++;
@@ -611,7 +613,7 @@ static int make_request(request_queue_t *q, struct bio * bio)
611 rcu_read_unlock(); 613 rcu_read_unlock();
612 614
613 atomic_set(&r1_bio->remaining, 1); 615 atomic_set(&r1_bio->remaining, 1);
614 md_write_start(mddev); 616
615 for (i = 0; i < disks; i++) { 617 for (i = 0; i < disks; i++) {
616 struct bio *mbio; 618 struct bio *mbio;
617 if (!r1_bio->bios[i]) 619 if (!r1_bio->bios[i])