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 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);