vm_remove_all_page_mappings(): Decrement the mapped pages count only, if

the page was really mapped before. Fixes bug #2585.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26876 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2008-08-08 14:01:09 +00:00
parent e387dd151b
commit 90cd1b25e1

View File

@ -2797,7 +2797,7 @@ vm_remove_all_page_mappings(vm_page *page, uint32 *_flags)
accumulatedFlags |= flags;
}
if (page->wired_count == 0)
if (page->wired_count == 0 && !queue.IsEmpty())
atomic_add(&gMappedPagesCount, -1);
locker.Unlock();