aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
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/staging
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/staging')
-rw-r--r--drivers/staging/zram/zram_drv.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/staging/zram/zram_drv.c b/drivers/staging/zram/zram_drv.c
index d70ec1ad10d..02589cab671 100644
--- a/drivers/staging/zram/zram_drv.c
+++ b/drivers/staging/zram/zram_drv.c
@@ -556,24 +556,22 @@ static inline int valid_io_request(struct zram *zram, struct bio *bio)
556/* 556/*
557 * Handler function for all zram I/O requests. 557 * Handler function for all zram I/O requests.
558 */ 558 */
559static int zram_make_request(struct request_queue *queue, struct bio *bio) 559static void zram_make_request(struct request_queue *queue, struct bio *bio)
560{ 560{
561 struct zram *zram = queue->queuedata; 561 struct zram *zram = queue->queuedata;
562 562
563 if (!valid_io_request(zram, bio)) { 563 if (!valid_io_request(zram, bio)) {
564 zram_stat64_inc(zram, &zram->stats.invalid_io); 564 zram_stat64_inc(zram, &zram->stats.invalid_io);
565 bio_io_error(bio); 565 bio_io_error(bio);
566 return 0; 566 return;
567 } 567 }
568 568
569 if (unlikely(!zram->init_done) && zram_init_device(zram)) { 569 if (unlikely(!zram->init_done) && zram_init_device(zram)) {
570 bio_io_error(bio); 570 bio_io_error(bio);
571 return 0; 571 return;
572 } 572 }
573 573
574 __zram_make_request(zram, bio, bio_data_dir(bio)); 574 __zram_make_request(zram, bio, bio_data_dir(bio));
575
576 return 0;
577} 575}
578 576
579void zram_reset_device(struct zram *zram) 577void zram_reset_device(struct zram *zram)