ZVC: highmem.c: Use page after it may have been freed
This is not really a problem since the zone of a page does not
change after it has been freed but its cleaner to use the
page as a reference before it has been freed.
Move the dec_zone_page_state before the free.
Signed-off-by: Christoph Lameter <[email protected]>
Index: linux-2.6.17-mm3/mm/highmem.c
===================================================================
--- linux-2.6.17-mm3.orig/mm/highmem.c 2006-06-27 09:40:25.586421810 -0700
+++ linux-2.6.17-mm3/mm/highmem.c 2006-06-27 09:42:19.342074956 -0700
@@ -315,8 +315,8 @@ static void bounce_end_io(struct bio *bi
if (bvec->bv_page == org_vec->bv_page)
continue;
- mempool_free(bvec->bv_page, pool);
dec_zone_page_state(bvec->bv_page, NR_BOUNCE);
+ mempool_free(bvec->bv_page, pool);
}
bio_endio(bio_orig, bio_orig->bi_size, err);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]