[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>
This commit is contained in:
parent
469340236a
commit
b16bc64d1a
|
@ -576,15 +576,14 @@ void page_add_file_rmap(struct page *page)
|
|||
void page_remove_rmap(struct page *page)
|
||||
{
|
||||
if (atomic_add_negative(-1, &page->_mapcount)) {
|
||||
#ifdef CONFIG_DEBUG_VM
|
||||
if (unlikely(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();
|
||||
}
|
||||
#endif
|
||||
BUG_ON(page_mapcount(page) < 0);
|
||||
|
||||
/*
|
||||
* It would be tidy to reset the PageAnon mapping here,
|
||||
* but that might overwrite a racing page_add_anon_rmap
|
||||
|
|
Loading…
Reference in New Issue