[PATCH] mips: setup_zero_pages count 1
authorHugh Dickins <hugh@veritas.com>
Mon, 12 Dec 2005 08:37:23 +0000 (00:37 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 12 Dec 2005 16:57:43 +0000 (08:57 -0800)
Page count should be initialized to 1 on each of the MIPS empty zero pages,
to avoid a bad_page warning whenever one of them is freed from all mappings.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/mips/mm/init.c

index 3a49036e0ae8f378056e46c88689276dda9035bb..4ee91c9a556fed7f53dfb534cfc8d474392952a7 100644 (file)
@@ -67,8 +67,8 @@ unsigned long setup_zero_pages(void)
 
        page = virt_to_page(empty_zero_page);
        while (page < virt_to_page(empty_zero_page + (PAGE_SIZE << order))) {
-               set_bit(PG_reserved, &page->flags);
-               reset_page_mapcount(page);
+               SetPageReserved(page);
+               set_page_count(page, 1);
                page++;
        }