aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-05-22 08:08:33 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-05-22 08:08:33 -0700
commitd321a42d00053e526cf06816fe505907af456e80 (patch)
tree25575d598d4c285b3bd70d0bcc8d3ebeea9724cd /mm
parentc3a17613880a6e99a120a406d9312581d7498890 (diff)
downloadhistory-d321a42d00053e526cf06816fe505907af456e80.tar.gz
[PATCH] rmap 30 fix bad mapcount
From: Hugh Dickins <hugh@veritas.com> From: Andrea Arcangeli <andrea@suse.de> page_alloc.c's bad_page routine should reset a bad mapcount; and it's more revealing to show the bad mapcount than just the boolean mapped.
Diffstat (limited to 'mm')
-rw-r--r--mm/page_alloc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 86c00e43b51939..5769a391d4e397 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -73,9 +73,9 @@ static void bad_page(const char *function, struct page *page)
{
printk(KERN_EMERG "Bad page state at %s (in process '%s', page %p)\n",
function, current->comm, page);
- printk(KERN_EMERG "flags:0x%08lx mapping:%p mapped:%d count:%d\n",
+ printk(KERN_EMERG "flags:0x%08lx mapping:%p mapcount:%d count:%d\n",
(unsigned long)page->flags, page->mapping,
- page_mapped(page), page_count(page));
+ (int)page->mapcount, page_count(page));
printk(KERN_EMERG "Backtrace:\n");
dump_stack();
printk(KERN_EMERG "Trying to fix it up, but a reboot is needed\n");
@@ -90,6 +90,7 @@ static void bad_page(const char *function, struct page *page)
1 << PG_writeback);
set_page_count(page, 0);
page->mapping = NULL;
+ page->mapcount = 0;
}
#ifndef CONFIG_HUGETLB_PAGE