summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorDave Jones <davej@redhat.com>2006-01-08 01:01:00 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-08 20:12:44 -0800
commitef2bf0dc8675e14cf8cba3b7fb9f48d72640a70e (patch)
tree6ef3afba5ca1929cc982efad092ffae62233b813 /mm
parentcd105df4590c89837a1c300843238148cfef9b5f (diff)
downloadop-kernel-dev-ef2bf0dc8675e14cf8cba3b7fb9f48d72640a70e.zip
op-kernel-dev-ef2bf0dc8675e14cf8cba3b7fb9f48d72640a70e.tar.gz
[PATCH] rmap: additional diagnostics in page_remove_rmap()
We seem to be hitting this assertion failure too often for it to be hardware bugs. Cc: Hugh Dickins <hugh@veritas.com> Cc: Nick Piggin <nickpiggin@yahoo.com.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/rmap.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/mm/rmap.c b/mm/rmap.c
index 6f3f7db..66ec430 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -514,6 +514,13 @@ void page_add_file_rmap(struct page *page)
void page_remove_rmap(struct page *page)
{
if (atomic_add_negative(-1, &page->_mapcount)) {
+ if (page_mapcount(page) < 0) {
+ printk (KERN_EMERG "Eeek! page_mapcount(page) went negative! (%d)\n", page_mapcount(page));
+ printk (KERN_EMERG " page->flags = %lx\n", page->flags);
+ printk (KERN_EMERG " page->count = %x\n", page_count(page));
+ printk (KERN_EMERG " page->mapping = %p\n", page->mapping);
+ }
+
BUG_ON(page_mapcount(page) < 0);
/*
* It would be tidy to reset the PageAnon mapping here,
OpenPOWER on IntegriCloud