[PATCH 05 of 31] fix bad_page to show the real reason the page is bad

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

page_count shows the count of the head page, but the actual check is done on
the tail page, so show what is really being checked.

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
@@ -265,7 +265,7 @@ static void bad_page(struct page *page)
current->comm, page_to_pfn(page));
printk(KERN_ALERT
"page:%p flags:%p count:%d mapcount:%d mapping:%p index:%lx\n",
- page, (void *)page->flags, page_count(page),
+ page, (void *)page->flags, atomic_read(&page->_count),
page_mapcount(page), page->mapping, page->index);

dump_stack();