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:
@@ -2797,7 +2797,7 @@ vm_remove_all_page_mappings(vm_page *page, uint32 *_flags)
|
|||||||
accumulatedFlags |= flags;
|
accumulatedFlags |= flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (page->wired_count == 0)
|
if (page->wired_count == 0 && !queue.IsEmpty())
|
||||||
atomic_add(&gMappedPagesCount, -1);
|
atomic_add(&gMappedPagesCount, -1);
|
||||||
|
|
||||||
locker.Unlock();
|
locker.Unlock();
|
||||||
|
|||||||
Reference in New Issue
Block a user