block: make generic_make_request handle arbitrarily sized bios
[cascardo/linux.git] / drivers / block / pktcdvd.c
index a7a259e..ee7ad5e 100644 (file)
@@ -2447,6 +2447,10 @@ static void pkt_make_request(struct request_queue *q, struct bio *bio)
        char b[BDEVNAME_SIZE];
        struct bio *split;
 
+       blk_queue_bounce(q, &bio);
+
+       blk_queue_split(q, &bio, q->bio_split);
+
        pd = q->queuedata;
        if (!pd) {
                pr_err("%s incorrect request queue\n",
@@ -2477,8 +2481,6 @@ static void pkt_make_request(struct request_queue *q, struct bio *bio)
                goto end_io;
        }
 
-       blk_queue_bounce(q, &bio);
-
        do {
                sector_t zone = get_zone(bio->bi_iter.bi_sector, pd);
                sector_t last_zone = get_zone(bio_end_sector(bio) - 1, pd);