From: Christophe Saout <christophe@saout.de>

__end_that_request_first might modify the bv_offset and bv_len if the
segment was partially completed.  The bio-read-bounce-back code should use
the unmodified bv_offset when copying the segment data:


---

 25-akpm/mm/highmem.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletion(-)

diff -puN mm/highmem.c~bio-highmem-fix mm/highmem.c
--- 25/mm/highmem.c~bio-highmem-fix	Thu Feb 26 13:56:01 2004
+++ 25-akpm/mm/highmem.c	Thu Feb 26 13:56:01 2004
@@ -294,7 +294,12 @@ static void copy_to_high_bio_irq(struct 
 		if (tovec->bv_page == fromvec->bv_page)
 			continue;
 
-		vfrom = page_address(fromvec->bv_page) + fromvec->bv_offset;
+		/*
+		 * fromvec->bv_offset and fromvec->bv_len might have been
+		 * modified by the block layer, so use the original copy,
+		 * bounce_copy_vec already uses tovec->bv_len
+		 */
+		vfrom = page_address(fromvec->bv_page) + tovec->bv_offset;
 
 		bounce_copy_vec(tovec, vfrom);
 	}

_