diff options
author | Dave Jones <davej@redhat.com> | 2006-10-11 04:21:27 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-11 14:14:19 -0400 |
commit | b16bc64d1aed40fb9cff9187061005b2a89b5d5d (patch) | |
tree | f6892377e9be2dcf1270f1158a1c325052b3b5c9 /mm | |
parent | 469340236a7c9673df3e6a2425f559517f01464e (diff) |
[PATCH] move rmap BUG_ON outside DEBUG_VM
We have a persistent dribble of reports of this BUG triggering. Its extended
diagnostics were recently made conditional on CONFIG_DEBUG_VM, which was a bad
idea - we want to know about it.
Signed-off-by: Dave Jones <davej@redhat.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Hugh Dickins <hugh@veritas.com>
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.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -576,15 +576,14 @@ void page_add_file_rmap(struct page *page) | |||
576 | void page_remove_rmap(struct page *page) | 576 | void page_remove_rmap(struct page *page) |
577 | { | 577 | { |
578 | if (atomic_add_negative(-1, &page->_mapcount)) { | 578 | if (atomic_add_negative(-1, &page->_mapcount)) { |
579 | #ifdef CONFIG_DEBUG_VM | ||
580 | if (unlikely(page_mapcount(page) < 0)) { | 579 | if (unlikely(page_mapcount(page) < 0)) { |
581 | printk (KERN_EMERG "Eeek! page_mapcount(page) went negative! (%d)\n", page_mapcount(page)); | 580 | printk (KERN_EMERG "Eeek! page_mapcount(page) went negative! (%d)\n", page_mapcount(page)); |
582 | printk (KERN_EMERG " page->flags = %lx\n", page->flags); | 581 | printk (KERN_EMERG " page->flags = %lx\n", page->flags); |
583 | printk (KERN_EMERG " page->count = %x\n", page_count(page)); | 582 | printk (KERN_EMERG " page->count = %x\n", page_count(page)); |
584 | printk (KERN_EMERG " page->mapping = %p\n", page->mapping); | 583 | printk (KERN_EMERG " page->mapping = %p\n", page->mapping); |
584 | BUG(); | ||
585 | } | 585 | } |
586 | #endif | 586 | |
587 | BUG_ON(page_mapcount(page) < 0); | ||
588 | /* | 587 | /* |
589 | * It would be tidy to reset the PageAnon mapping here, | 588 | * It would be tidy to reset the PageAnon mapping here, |
590 | * but that might overwrite a racing page_add_anon_rmap | 589 | * but that might overwrite a racing page_add_anon_rmap |