diff options
author | NeilBrown <neilb@suse.de> | 2007-09-27 06:47:43 -0400 |
---|---|---|
committer | Jens Axboe <axboe@carl.home.kernel.dk> | 2007-10-10 03:25:57 -0400 |
commit | 6712ecf8f648118c3363c142196418f89a510b90 (patch) | |
tree | 347d39a7d5a7ed96d3b1afecd28de2a0f98b98c9 /drivers/scsi/scsi_lib.c | |
parent | 5bb23a688b2de23d7765a1dd439d89c038378978 (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 'drivers/scsi/scsi_lib.c')
-rw-r--r-- | drivers/scsi/scsi_lib.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 59b398530295..604f4d717933 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c | |||
@@ -266,13 +266,9 @@ static int scsi_merge_bio(struct request *rq, struct bio *bio) | |||
266 | return blk_rq_append_bio(q, rq, bio); | 266 | return blk_rq_append_bio(q, rq, bio); |
267 | } | 267 | } |
268 | 268 | ||
269 | static int scsi_bi_endio(struct bio *bio, unsigned int bytes_done, int error) | 269 | static void scsi_bi_endio(struct bio *bio, int error) |
270 | { | 270 | { |
271 | if (bio->bi_size) | ||
272 | return 1; | ||
273 | |||
274 | bio_put(bio); | 271 | bio_put(bio); |
275 | return 0; | ||
276 | } | 272 | } |
277 | 273 | ||
278 | /** | 274 | /** |
@@ -328,7 +324,7 @@ static int scsi_req_map_sg(struct request *rq, struct scatterlist *sgl, | |||
328 | if (bio->bi_vcnt >= nr_vecs) { | 324 | if (bio->bi_vcnt >= nr_vecs) { |
329 | err = scsi_merge_bio(rq, bio); | 325 | err = scsi_merge_bio(rq, bio); |
330 | if (err) { | 326 | if (err) { |
331 | bio_endio(bio, bio->bi_size, 0); | 327 | bio_endio(bio, 0); |
332 | goto free_bios; | 328 | goto free_bios; |
333 | } | 329 | } |
334 | bio = NULL; | 330 | bio = NULL; |
@@ -350,7 +346,7 @@ free_bios: | |||
350 | /* | 346 | /* |
351 | * call endio instead of bio_put incase it was bounced | 347 | * call endio instead of bio_put incase it was bounced |
352 | */ | 348 | */ |
353 | bio_endio(bio, bio->bi_size, 0); | 349 | bio_endio(bio, 0); |
354 | } | 350 | } |
355 | 351 | ||
356 | return err; | 352 | return err; |