|
@@ -1133,7 +1133,12 @@ static void raid10_unplug(struct blk_plug_cb *cb, bool from_schedule)
|
|
while (bio) { /* submit pending writes */
|
|
while (bio) { /* submit pending writes */
|
|
struct bio *next = bio->bi_next;
|
|
struct bio *next = bio->bi_next;
|
|
bio->bi_next = NULL;
|
|
bio->bi_next = NULL;
|
|
- generic_make_request(bio);
|
|
|
|
|
|
+ if (unlikely((bio->bi_rw & REQ_DISCARD) &&
|
|
|
|
+ !blk_queue_discard(bdev_get_queue(bio->bi_bdev))))
|
|
|
|
+ /* Just ignore it */
|
|
|
|
+ bio_endio(bio, 0);
|
|
|
|
+ else
|
|
|
|
+ generic_make_request(bio);
|
|
bio = next;
|
|
bio = next;
|
|
}
|
|
}
|
|
kfree(plug);
|
|
kfree(plug);
|