diff options
-rw-r--r-- | drivers/md/raid10.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index 0c97bf4f686e..4e53792aa520 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c | |||
@@ -917,6 +917,13 @@ static int make_request(struct request_queue *q, struct bio * bio) | |||
917 | bio_list_add(&bl, mbio); | 917 | bio_list_add(&bl, mbio); |
918 | } | 918 | } |
919 | 919 | ||
920 | if (unlikely(!atomic_read(&r10_bio->remaining))) { | ||
921 | /* the array is dead */ | ||
922 | md_write_end(mddev); | ||
923 | raid_end_bio_io(r10_bio); | ||
924 | return 0; | ||
925 | } | ||
926 | |||
920 | bitmap_startwrite(mddev->bitmap, bio->bi_sector, r10_bio->sectors, 0); | 927 | bitmap_startwrite(mddev->bitmap, bio->bi_sector, r10_bio->sectors, 0); |
921 | spin_lock_irqsave(&conf->device_lock, flags); | 928 | spin_lock_irqsave(&conf->device_lock, flags); |
922 | bio_list_merge(&conf->pending_bio_list, &bl); | 929 | bio_list_merge(&conf->pending_bio_list, &bl); |