aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-01-09 17:02:01 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-01-09 17:02:01 -0800
commit72bd4e564ad30acdb43767eb5555032b14cb0195 (patch)
treecb96083b476c006d5eec6a03d12c5f16f6a002f6 /mm
parentfc3e8c967092bb96d7a84afeab82077c2f98c55b (diff)
downloadhistory-72bd4e564ad30acdb43767eb5555032b14cb0195.tar.gz
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.
Diffstat (limited to 'mm')
-rw-r--r--mm/page_alloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 5b8ebb16a07ca8..4afaf20f03b306 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -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 @@ nopage:
return NULL;
got_pg:
zone_statistics(zonelist, z);
- kernel_map_pages(page, 1 << order, 1);
return page;
}