Commit 72bd4e56 authored by Linus Torvalds's avatar Linus Torvalds

Map new page allocations as part of "prep_new_page".

This not only makes sense, it fixes DEBUG_PAGEALLOC together with
the new page zeroing, since we must map the page before we zero it.

As per Chris Wright.
parent fc3e8c96
......@@ -413,6 +413,7 @@ static void prep_new_page(struct page *page, int order)
1 << PG_checked | 1 << PG_mappedtodisk);
page->private = 0;
set_page_refs(page, order);
kernel_map_pages(page, 1 << order, 1);
}
/*
......@@ -823,7 +824,6 @@ __alloc_pages(unsigned int gfp_mask, unsigned int order,
return NULL;
got_pg:
zone_statistics(zonelist, z);
kernel_map_pages(page, 1 << order, 1);
return page;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment