From: Nick Piggin Date: Wed, 11 Oct 2006 08:21:30 +0000 (-0700) Subject: [PATCH] mm: arch_free_page fix X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=dafb13673c463bc2aade4a4819704dde0f5fa37f;p=linux-beck.git [PATCH] mm: arch_free_page fix After the PG_reserved check was added, arch_free_page was being called in the wrong place (it could be called for a page we don't actually want to free). Fix that. Signed-off-by: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 8246e834b2f0..c5caac2c3c5a 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -495,7 +495,6 @@ static void __free_pages_ok(struct page *page, unsigned int order) int i; int reserved = 0; - arch_free_page(page, order); if (!PageHighMem(page)) debug_check_no_locks_freed(page_address(page), PAGE_SIZE<mapping = NULL; if (free_pages_check(page)) return; + arch_free_page(page, 0); kernel_map_pages(page, 1, 0); pcp = &zone_pcp(zone, get_cpu())->pcp[cold];