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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user