kernel/vm: Move page ACCESS state up in VMCache::Delete.
Should fix #20240. (cherry picked from commit 5e3fdaa3cc70c1c9a09d6995e585ca400451cf56) Change-Id: I090439121e036bf3ba5cccd9bac2bbb081aa77e1 Reviewed-on: https://review.haiku-os.org/c/haiku/+/11500 Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
8c1b894d60
commit
a964c2cdaf
@@ -691,6 +691,8 @@ VMCache::Delete()
|
||||
"@!page %p; cache %p", page, this, page, this);
|
||||
}
|
||||
|
||||
DEBUG_PAGE_ACCESS_START(page);
|
||||
|
||||
if (page->State() == PAGE_STATE_MODIFIED) {
|
||||
// pages can't be freed in MODIFIED state
|
||||
page->modified = false;
|
||||
@@ -704,7 +706,6 @@ VMCache::Delete()
|
||||
|
||||
TRACE(("vm_cache_release_ref: freeing page 0x%lx\n",
|
||||
page->physical_page_number));
|
||||
DEBUG_PAGE_ACCESS_START(page);
|
||||
vm_page_free_etc(this, page, &reservation);
|
||||
}
|
||||
vm_page_unreserve_pages(&reservation);
|
||||
|
||||
Reference in New Issue
Block a user