aboutsummaryrefslogtreecommitdiffstats
path: root/mm/bounce.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2007-09-27 06:47:43 -0400
committerJens Axboe <axboe@carl.home.kernel.dk>2007-10-10 03:25:57 -0400
commit6712ecf8f648118c3363c142196418f89a510b90 (patch)
tree347d39a7d5a7ed96d3b1afecd28de2a0f98b98c9 /mm/bounce.c
parent5bb23a688b2de23d7765a1dd439d89c038378978 (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.c25
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
147static int bounce_end_io_write(struct bio *bio, unsigned int bytes_done, int err) 147static 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
156static int bounce_end_io_write_isa(struct bio *bio, unsigned int bytes_done, int err) 152static 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
165static void __bounce_end_io_read(struct bio *bio, mempool_t *pool, int err) 158static 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
175static int bounce_end_io_read(struct bio *bio, unsigned int bytes_done, int err) 168static 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
184static int bounce_end_io_read_isa(struct bio *bio, unsigned int bytes_done, int err) 173static 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
193static void __blk_queue_bounce(struct request_queue *q, struct bio **bio_orig, 178static void __blk_queue_bounce(struct request_queue *q, struct bio **bio_orig,