From 6712ecf8f648118c3363c142196418f89a510b90 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Thu, 27 Sep 2007 12:47:43 +0200 Subject: 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 Signed-off-by: Jens Axboe --- drivers/md/dm-io.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'drivers/md/dm-io.c') diff --git a/drivers/md/dm-io.c b/drivers/md/dm-io.c index f3a772486437..b8e342fe7586 100644 --- a/drivers/md/dm-io.c +++ b/drivers/md/dm-io.c @@ -124,15 +124,11 @@ static void dec_count(struct io *io, unsigned int region, int error) } } -static int endio(struct bio *bio, unsigned int done, int error) +static void endio(struct bio *bio, int error) { struct io *io; unsigned region; - /* keep going until we've finished */ - if (bio->bi_size) - return 1; - if (error && bio_data_dir(bio) == READ) zero_fill_bio(bio); @@ -146,8 +142,6 @@ static int endio(struct bio *bio, unsigned int done, int error) bio_put(bio); dec_count(io, region, error); - - return 0; } /*----------------------------------------------------------------- -- cgit v1.2.3