diff options
author | Christoph Hellwig <hch@infradead.org> | 2011-09-12 06:12:01 -0400 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2011-09-12 06:12:01 -0400 |
commit | 5a7bbad27a410350e64a2d7f5ec18fc73836c14f (patch) | |
tree | 3447cd62dbcbd77b4071e2eb7576f1d7632ef2d3 /drivers/block/loop.c | |
parent | c20e8de27fef9f59869c81c288ad6cf28200e00c (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/loop.c')
-rw-r--r-- | drivers/block/loop.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/block/loop.c b/drivers/block/loop.c index 76c8da78212b..8360239d553c 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c | |||
@@ -514,7 +514,7 @@ static struct bio *loop_get_bio(struct loop_device *lo) | |||
514 | return bio_list_pop(&lo->lo_bio_list); | 514 | return bio_list_pop(&lo->lo_bio_list); |
515 | } | 515 | } |
516 | 516 | ||
517 | static int loop_make_request(struct request_queue *q, struct bio *old_bio) | 517 | static void loop_make_request(struct request_queue *q, struct bio *old_bio) |
518 | { | 518 | { |
519 | struct loop_device *lo = q->queuedata; | 519 | struct loop_device *lo = q->queuedata; |
520 | int rw = bio_rw(old_bio); | 520 | int rw = bio_rw(old_bio); |
@@ -532,12 +532,11 @@ static int loop_make_request(struct request_queue *q, struct bio *old_bio) | |||
532 | loop_add_bio(lo, old_bio); | 532 | loop_add_bio(lo, old_bio); |
533 | wake_up(&lo->lo_event); | 533 | wake_up(&lo->lo_event); |
534 | spin_unlock_irq(&lo->lo_lock); | 534 | spin_unlock_irq(&lo->lo_lock); |
535 | return 0; | 535 | return; |
536 | 536 | ||
537 | out: | 537 | out: |
538 | spin_unlock_irq(&lo->lo_lock); | 538 | spin_unlock_irq(&lo->lo_lock); |
539 | bio_io_error(old_bio); | 539 | bio_io_error(old_bio); |
540 | return 0; | ||
541 | } | 540 | } |
542 | 541 | ||
543 | struct switch_request { | 542 | struct switch_request { |