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>
This commit is contained in:
NeilBrown
2007-09-27 12:47:43 +02:00
committed by Jens Axboe
parent 5bb23a688b
commit 6712ecf8f6
45 changed files with 132 additions and 328 deletions

View File

@@ -266,13 +266,9 @@ static int scsi_merge_bio(struct request *rq, struct bio *bio)
return blk_rq_append_bio(q, rq, bio);
}
static int scsi_bi_endio(struct bio *bio, unsigned int bytes_done, int error)
static void scsi_bi_endio(struct bio *bio, int error)
{
if (bio->bi_size)
return 1;
bio_put(bio);
return 0;
}
/**
@@ -328,7 +324,7 @@ static int scsi_req_map_sg(struct request *rq, struct scatterlist *sgl,
if (bio->bi_vcnt >= nr_vecs) {
err = scsi_merge_bio(rq, bio);
if (err) {
bio_endio(bio, bio->bi_size, 0);
bio_endio(bio, 0);
goto free_bios;
}
bio = NULL;
@@ -350,7 +346,7 @@ free_bios:
/*
* call endio instead of bio_put incase it was bounced
*/
bio_endio(bio, bio->bi_size, 0);
bio_endio(bio, 0);
}
return err;