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 /mm/bounce.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 'mm/bounce.c')
-rw-r--r-- | mm/bounce.c | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/mm/bounce.c b/mm/bounce.c index 179fe38a2416..3b549bf31f7d 100644 --- a/mm/bounce.c +++ b/mm/bounce.c | |||
@@ -140,26 +140,19 @@ static void bounce_end_io(struct bio *bio, mempool_t *pool, int err) | |||
140 | mempool_free(bvec->bv_page, pool); | 140 | mempool_free(bvec->bv_page, pool); |
141 | } | 141 | } |
142 | 142 | ||
143 | bio_endio(bio_orig, bio_orig->bi_size, err); | 143 | bio_endio(bio_orig, err); |
144 | bio_put(bio); | 144 | bio_put(bio); |
145 | } | 145 | } |
146 | 146 | ||
147 | static int bounce_end_io_write(struct bio *bio, unsigned int bytes_done, int err) | 147 | static void bounce_end_io_write(struct bio *bio, int err) |
148 | { | 148 | { |
149 | if (bio->bi_size) | ||
150 | return 1; | ||
151 | |||
152 | bounce_end_io(bio, page_pool, err); | 149 | bounce_end_io(bio, page_pool, err); |
153 | return 0; | ||
154 | } | 150 | } |
155 | 151 | ||
156 | static int bounce_end_io_write_isa(struct bio *bio, unsigned int bytes_done, int err) | 152 | static void bounce_end_io_write_isa(struct bio *bio, int err) |
157 | { | 153 | { |
158 | if (bio->bi_size) | ||
159 | return 1; | ||
160 | 154 | ||
161 | bounce_end_io(bio, isa_page_pool, err); | 155 | bounce_end_io(bio, isa_page_pool, err); |
162 | return 0; | ||
163 | } | 156 | } |
164 | 157 | ||
165 | static void __bounce_end_io_read(struct bio *bio, mempool_t *pool, int err) | 158 | static void __bounce_end_io_read(struct bio *bio, mempool_t *pool, int err) |
@@ -172,22 +165,14 @@ static void __bounce_end_io_read(struct bio *bio, mempool_t *pool, int err) | |||
172 | bounce_end_io(bio, pool, err); | 165 | bounce_end_io(bio, pool, err); |
173 | } | 166 | } |
174 | 167 | ||
175 | static int bounce_end_io_read(struct bio *bio, unsigned int bytes_done, int err) | 168 | static void bounce_end_io_read(struct bio *bio, int err) |
176 | { | 169 | { |
177 | if (bio->bi_size) | ||
178 | return 1; | ||
179 | |||
180 | __bounce_end_io_read(bio, page_pool, err); | 170 | __bounce_end_io_read(bio, page_pool, err); |
181 | return 0; | ||
182 | } | 171 | } |
183 | 172 | ||
184 | static int bounce_end_io_read_isa(struct bio *bio, unsigned int bytes_done, int err) | 173 | static void bounce_end_io_read_isa(struct bio *bio, int err) |
185 | { | 174 | { |
186 | if (bio->bi_size) | ||
187 | return 1; | ||
188 | |||
189 | __bounce_end_io_read(bio, isa_page_pool, err); | 175 | __bounce_end_io_read(bio, isa_page_pool, err); |
190 | return 0; | ||
191 | } | 176 | } |
192 | 177 | ||
193 | static void __blk_queue_bounce(struct request_queue *q, struct bio **bio_orig, | 178 | static void __blk_queue_bounce(struct request_queue *q, struct bio **bio_orig, |