reserve_pages(): When cannibalizing pages from the own cache it didn't check
whether the pages where mapped. Was introduced already in r22731. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35532 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
d36b9aef3e
commit
211c63df5a
5
src/system/kernel/cache/file_cache.cpp
vendored
5
src/system/kernel/cache/file_cache.cpp
vendored
@ -309,9 +309,10 @@ reserve_pages(file_cache_ref* ref, vm_page_reservation* reservation,
|
||||
vm_page* page;
|
||||
for (VMCachePagesTree::Iterator it = cache->pages.GetIterator();
|
||||
(page = it.Next()) != NULL && left > 0;) {
|
||||
if (page->state != PAGE_STATE_MODIFIED && !page->modified
|
||||
&& !page->busy) {
|
||||
if (page->state == PAGE_STATE_CACHED && !page->busy) {
|
||||
DEBUG_PAGE_ACCESS_START(page);
|
||||
ASSERT(!page->IsMapped());
|
||||
ASSERT(!page->modified);
|
||||
cache->RemovePage(page);
|
||||
vm_page_set_state(page, PAGE_STATE_FREE);
|
||||
left--;
|
||||
|
Loading…
Reference in New Issue
Block a user