]> git.hungrycats.org Git - linux/commitdiff
[PATCH] [PATCH] Fix bounced bio and dm panic
authorJens Axboe <axboe@suse.de>
Mon, 28 Feb 2005 02:28:19 +0000 (18:28 -0800)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Mon, 28 Feb 2005 02:28:19 +0000 (18:28 -0800)
Make sure that a bio doesn't contain NULL pages in the front of its vec,
if a device bounces a bio that doesn't start from 0.

Problem noted by Mark Haverkamp.

Signed-off-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
mm/highmem.c

index c37d66cb1af1279246b0c2289ec7561e3aba7f53..e4cb0aadadaa151c697c3d073349398794dd8216 100644 (file)
@@ -425,7 +425,7 @@ static void __blk_queue_bounce(request_queue_t *q, struct bio **bio_orig,
         * at least one page was bounced, fill in possible non-highmem
         * pages
         */
-       bio_for_each_segment(from, *bio_orig, i) {
+       __bio_for_each_segment(from, *bio_orig, i, 0) {
                to = bio_iovec_idx(bio, i);
                if (!to->bv_page) {
                        to->bv_page = from->bv_page;