aboutsummaryrefslogtreecommitdiffstats
path: root/block/ll_rw_blk.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2007-09-27 06:47:43 -0400
committerJens Axboe <axboe@carl.home.kernel.dk>2007-10-10 03:25:57 -0400
commit6712ecf8f648118c3363c142196418f89a510b90 (patch)
tree347d39a7d5a7ed96d3b1afecd28de2a0f98b98c9 /block/ll_rw_blk.c
parent5bb23a688b2de23d7765a1dd439d89c038378978 (diff)
Drop 'size' argument from bio_endio and bi_end_io
As bi_end_io is only called once when the reqeust is complete, the 'size' argument is now redundant. Remove it. Now there is no need for bio_endio to subtract the size completed from bi_size. So don't do that either. While we are at it, change bi_end_io to return void. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/ll_rw_blk.c')
-rw-r--r--block/ll_rw_blk.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
index b55ed0df33f0..cd9d2c5d91ae 100644
--- a/block/ll_rw_blk.c
+++ b/block/ll_rw_blk.c
@@ -547,7 +547,7 @@ static void req_bio_endio(struct request *rq, struct bio *bio,
547 bio->bi_size -= nbytes; 547 bio->bi_size -= nbytes;
548 bio->bi_sector += (nbytes >> 9); 548 bio->bi_sector += (nbytes >> 9);
549 if (bio->bi_size == 0) 549 if (bio->bi_size == 0)
550 bio_endio(bio, bio->bi_size, error); 550 bio_endio(bio, error);
551 } else { 551 } else {
552 552
553 /* 553 /*
@@ -2401,7 +2401,7 @@ static int __blk_rq_map_user(struct request_queue *q, struct request *rq,
2401 return bio->bi_size; 2401 return bio->bi_size;
2402 2402
2403 /* if it was boucned we must call the end io function */ 2403 /* if it was boucned we must call the end io function */
2404 bio_endio(bio, bio->bi_size, 0); 2404 bio_endio(bio, 0);
2405 __blk_rq_unmap_user(orig_bio); 2405 __blk_rq_unmap_user(orig_bio);
2406 bio_put(bio); 2406 bio_put(bio);
2407 return ret; 2407 return ret;
@@ -2510,7 +2510,7 @@ int blk_rq_map_user_iov(struct request_queue *q, struct request *rq,
2510 return PTR_ERR(bio); 2510 return PTR_ERR(bio);
2511 2511
2512 if (bio->bi_size != len) { 2512 if (bio->bi_size != len) {
2513 bio_endio(bio, bio->bi_size, 0); 2513 bio_endio(bio, 0);
2514 bio_unmap_user(bio); 2514 bio_unmap_user(bio);
2515 return -EINVAL; 2515 return -EINVAL;
2516 } 2516 }
@@ -3040,7 +3040,7 @@ out:
3040 return 0; 3040 return 0;
3041 3041
3042end_io: 3042end_io:
3043 bio_endio(bio, nr_sectors << 9, err); 3043 bio_endio(bio, err);
3044 return 0; 3044 return 0;
3045} 3045}
3046 3046
@@ -3187,7 +3187,7 @@ static inline void __generic_make_request(struct bio *bio)
3187 bdevname(bio->bi_bdev, b), 3187 bdevname(bio->bi_bdev, b),
3188 (long long) bio->bi_sector); 3188 (long long) bio->bi_sector);
3189end_io: 3189end_io:
3190 bio_endio(bio, bio->bi_size, -EIO); 3190 bio_endio(bio, -EIO);
3191 break; 3191 break;
3192 } 3192 }
3193 3193