[PATCH 06 of 31] clear compound mapping

Andrea Arcangeli
2010-01-25T17:30:12Z

Clear compound mapping for anonymous compound pages like it already happens for
regular anonymous pages.

Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
---

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -584,6 +584,8 @@ static void __free_pages_ok(struct page

kmemcheck_free_shadow(page, order);

+ if (PageAnon(page))
+ page->mapping = NULL;
for (i = 0 ; i < (1 << order) ; ++i)
bad += free_pages_check(page + i);
if (bad)