aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/pktcdvd.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2011-09-12 06:12:01 -0400
committerJens Axboe <jaxboe@fusionio.com>2011-09-12 06:12:01 -0400
commit5a7bbad27a410350e64a2d7f5ec18fc73836c14f (patch)
tree3447cd62dbcbd77b4071e2eb7576f1d7632ef2d3 /drivers/block/pktcdvd.c
parentc20e8de27fef9f59869c81c288ad6cf28200e00c (diff)
block: remove support for bio remapping from ->make_request
There is very little benefit in allowing to let a ->make_request instance update the bios device and sector and loop around it in __generic_make_request when we can archive the same through calling generic_make_request from the driver and letting the loop in generic_make_request handle it. Note that various drivers got the return value from ->make_request and returned non-zero values for errors. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: NeilBrown <neilb@suse.de> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'drivers/block/pktcdvd.c')
-rw-r--r--drivers/block/pktcdvd.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index e133f094ab08..a63b0a2b7805 100644
--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -2444,7 +2444,7 @@ static void pkt_end_io_read_cloned(struct bio *bio, int err)
2444 pkt_bio_finished(pd); 2444 pkt_bio_finished(pd);
2445} 2445}
2446 2446
2447static int pkt_make_request(struct request_queue *q, struct bio *bio) 2447static void pkt_make_request(struct request_queue *q, struct bio *bio)
2448{ 2448{
2449 struct pktcdvd_device *pd; 2449 struct pktcdvd_device *pd;
2450 char b[BDEVNAME_SIZE]; 2450 char b[BDEVNAME_SIZE];
@@ -2473,7 +2473,7 @@ static int pkt_make_request(struct request_queue *q, struct bio *bio)
2473 cloned_bio->bi_end_io = pkt_end_io_read_cloned; 2473 cloned_bio->bi_end_io = pkt_end_io_read_cloned;
2474 pd->stats.secs_r += bio->bi_size >> 9; 2474 pd->stats.secs_r += bio->bi_size >> 9;
2475 pkt_queue_bio(pd, cloned_bio); 2475 pkt_queue_bio(pd, cloned_bio);
2476 return 0; 2476 return;
2477 } 2477 }
2478 2478
2479 if (!test_bit(PACKET_WRITABLE, &pd->flags)) { 2479 if (!test_bit(PACKET_WRITABLE, &pd->flags)) {
@@ -2509,7 +2509,7 @@ static int pkt_make_request(struct request_queue *q, struct bio *bio)
2509 pkt_make_request(q, &bp->bio1); 2509 pkt_make_request(q, &bp->bio1);
2510 pkt_make_request(q, &bp->bio2); 2510 pkt_make_request(q, &bp->bio2);
2511 bio_pair_release(bp); 2511 bio_pair_release(bp);
2512 return 0; 2512 return;
2513 } 2513 }
2514 } 2514 }
2515 2515
@@ -2533,7 +2533,7 @@ static int pkt_make_request(struct request_queue *q, struct bio *bio)
2533 } 2533 }
2534 spin_unlock(&pkt->lock); 2534 spin_unlock(&pkt->lock);
2535 spin_unlock(&pd->cdrw.active_list_lock); 2535 spin_unlock(&pd->cdrw.active_list_lock);
2536 return 0; 2536 return;
2537 } else { 2537 } else {
2538 blocked_bio = 1; 2538 blocked_bio = 1;
2539 } 2539 }
@@ -2584,10 +2584,9 @@ static int pkt_make_request(struct request_queue *q, struct bio *bio)
2584 */ 2584 */
2585 wake_up(&pd->wqueue); 2585 wake_up(&pd->wqueue);
2586 } 2586 }
2587 return 0; 2587 return;
2588end_io: 2588end_io:
2589 bio_io_error(bio); 2589 bio_io_error(bio);
2590 return 0;
2591} 2590}
2592 2591
2593 2592