# This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.582 -> 1.583 # mm/highmem.c 1.35 -> 1.36 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 02/09/19 axboe@burns.home.kernel.dk 1.583 # clean up highmem bounce end_io handling # -------------------------------------------- # diff -Nru a/mm/highmem.c b/mm/highmem.c --- a/mm/highmem.c Thu Sep 19 08:15:17 2002 +++ b/mm/highmem.c Thu Sep 19 08:15:17 2002 @@ -291,16 +291,12 @@ } } -static inline int bounce_end_io(struct bio *bio, unsigned int bytes_done, - int error, mempool_t *pool) +static void bounce_end_io(struct bio *bio, mempool_t *pool) { struct bio *bio_orig = bio->bi_private; struct bio_vec *bvec, *org_vec; int i; - if (bio->bi_size) - return 1; - if (!test_bit(BIO_UPTODATE, &bio->bi_flags)) goto out_eio; @@ -318,43 +314,54 @@ } out_eio: - bio_endio(bio_orig, bytes_done, error); + bio_endio(bio_orig, bio_orig->bi_size, 0); bio_put(bio); - return 0; } -static int bounce_end_io_write(struct bio *bio, unsigned int bytes_done, - int error) +static int bounce_end_io_write(struct bio *bio, unsigned int bytes_done,int err) { - return bounce_end_io(bio, bytes_done, error, page_pool); + if (bio->bi_size) + return 1; + + bounce_end_io(bio, page_pool); + return 0; } -static int bounce_end_io_write_isa(struct bio *bio, unsigned int bytes_done, - int error) +static int bounce_end_io_write_isa(struct bio *bio, unsigned int bytes_done, int err) { - return bounce_end_io(bio, bytes_done, error, isa_page_pool); + if (bio->bi_size) + return 1; + + bounce_end_io(bio, isa_page_pool); + return 0; } -static inline int __bounce_end_io_read(struct bio *bio, unsigned int done, - int error, mempool_t *pool) +static inline void __bounce_end_io_read(struct bio *bio, mempool_t *pool) { struct bio *bio_orig = bio->bi_private; if (test_bit(BIO_UPTODATE, &bio->bi_flags)) copy_to_high_bio_irq(bio_orig, bio); - return bounce_end_io(bio, done, error, pool); + bounce_end_io(bio, pool); } static int bounce_end_io_read(struct bio *bio, unsigned int bytes_done, int err) { - return __bounce_end_io_read(bio, bytes_done, err, page_pool); + if (bio->bi_size) + return 1; + + __bounce_end_io_read(bio, page_pool); + return 0; } -static int bounce_end_io_read_isa(struct bio *bio, unsigned int bytes_done, - int err) +static int bounce_end_io_read_isa(struct bio *bio, unsigned int bytes_done, int err) { - return __bounce_end_io_read(bio, bytes_done, err, isa_page_pool); + if (bio->bi_size) + return 1; + + __bounce_end_io_read(bio, isa_page_pool); + return 0; } void blk_queue_bounce(request_queue_t *q, struct bio **bio_orig)