aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/md/raid1.c3
-rw-r--r--drivers/md/raid10.c6
-rw-r--r--drivers/md/raid5.c9
3 files changed, 6 insertions, 12 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index 1d235cc8b402..f50958ded9f0 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -790,8 +790,7 @@ static void flush_bio_list(struct r1conf *conf, struct bio *bio)
790 bio->bi_next = NULL; 790 bio->bi_next = NULL;
791 bio->bi_bdev = rdev->bdev; 791 bio->bi_bdev = rdev->bdev;
792 if (test_bit(Faulty, &rdev->flags)) { 792 if (test_bit(Faulty, &rdev->flags)) {
793 bio->bi_status = BLK_STS_IOERR; 793 bio_io_error(bio);
794 bio_endio(bio);
795 } else if (unlikely((bio_op(bio) == REQ_OP_DISCARD) && 794 } else if (unlikely((bio_op(bio) == REQ_OP_DISCARD) &&
796 !blk_queue_discard(bdev_get_queue(bio->bi_bdev)))) 795 !blk_queue_discard(bdev_get_queue(bio->bi_bdev))))
797 /* Just ignore it */ 796 /* Just ignore it */
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index e2617d0f37dc..f55d4cc085f6 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -905,8 +905,7 @@ static void flush_pending_writes(struct r10conf *conf)
905 bio->bi_next = NULL; 905 bio->bi_next = NULL;
906 bio->bi_bdev = rdev->bdev; 906 bio->bi_bdev = rdev->bdev;
907 if (test_bit(Faulty, &rdev->flags)) { 907 if (test_bit(Faulty, &rdev->flags)) {
908 bio->bi_status = BLK_STS_IOERR; 908 bio_io_error(bio);
909 bio_endio(bio);
910 } else if (unlikely((bio_op(bio) == REQ_OP_DISCARD) && 909 } else if (unlikely((bio_op(bio) == REQ_OP_DISCARD) &&
911 !blk_queue_discard(bdev_get_queue(bio->bi_bdev)))) 910 !blk_queue_discard(bdev_get_queue(bio->bi_bdev))))
912 /* Just ignore it */ 911 /* Just ignore it */
@@ -1090,8 +1089,7 @@ static void raid10_unplug(struct blk_plug_cb *cb, bool from_schedule)
1090 bio->bi_next = NULL; 1089 bio->bi_next = NULL;
1091 bio->bi_bdev = rdev->bdev; 1090 bio->bi_bdev = rdev->bdev;
1092 if (test_bit(Faulty, &rdev->flags)) { 1091 if (test_bit(Faulty, &rdev->flags)) {
1093 bio->bi_status = BLK_STS_IOERR; 1092 bio_io_error(bio);
1094 bio_endio(bio);
1095 } else if (unlikely((bio_op(bio) == REQ_OP_DISCARD) && 1093 } else if (unlikely((bio_op(bio) == REQ_OP_DISCARD) &&
1096 !blk_queue_discard(bdev_get_queue(bio->bi_bdev)))) 1094 !blk_queue_discard(bdev_get_queue(bio->bi_bdev))))
1097 /* Just ignore it */ 1095 /* Just ignore it */
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index aeeb8d6854e2..4904dffec915 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -3381,9 +3381,8 @@ handle_failed_stripe(struct r5conf *conf, struct stripe_head *sh,
3381 sh->dev[i].sector + STRIPE_SECTORS) { 3381 sh->dev[i].sector + STRIPE_SECTORS) {
3382 struct bio *nextbi = r5_next_bio(bi, sh->dev[i].sector); 3382 struct bio *nextbi = r5_next_bio(bi, sh->dev[i].sector);
3383 3383
3384 bi->bi_status = BLK_STS_IOERR;
3385 md_write_end(conf->mddev); 3384 md_write_end(conf->mddev);
3386 bio_endio(bi); 3385 bio_io_error(bi);
3387 bi = nextbi; 3386 bi = nextbi;
3388 } 3387 }
3389 if (bitmap_end) 3388 if (bitmap_end)
@@ -3403,9 +3402,8 @@ handle_failed_stripe(struct r5conf *conf, struct stripe_head *sh,
3403 sh->dev[i].sector + STRIPE_SECTORS) { 3402 sh->dev[i].sector + STRIPE_SECTORS) {
3404 struct bio *bi2 = r5_next_bio(bi, sh->dev[i].sector); 3403 struct bio *bi2 = r5_next_bio(bi, sh->dev[i].sector);
3405 3404
3406 bi->bi_status = BLK_STS_IOERR;
3407 md_write_end(conf->mddev); 3405 md_write_end(conf->mddev);
3408 bio_endio(bi); 3406 bio_io_error(bi);
3409 bi = bi2; 3407 bi = bi2;
3410 } 3408 }
3411 3409
@@ -3429,8 +3427,7 @@ handle_failed_stripe(struct r5conf *conf, struct stripe_head *sh,
3429 struct bio *nextbi = 3427 struct bio *nextbi =
3430 r5_next_bio(bi, sh->dev[i].sector); 3428 r5_next_bio(bi, sh->dev[i].sector);
3431 3429
3432 bi->bi_status = BLK_STS_IOERR; 3430 bio_io_error(bi);
3433 bio_endio(bi);
3434 bi = nextbi; 3431 bi = nextbi;
3435 } 3432 }
3436 } 3433 }