kernel/vm: Add handling for pages in MODIFIED state in VMCache::Delete.
Should fix #20221. (cherry picked from commit 518a54b774411b901e99fc5a691a3c6dfc113c8d) Change-Id: Ia626d379c293ca710671a741d2b7525c60b29347 Reviewed-on: https://review.haiku-os.org/c/haiku/+/11404 Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
b641780cc9
commit
52d627b267
@@ -691,6 +691,12 @@ VMCache::Delete()
|
||||
"@!page %p; cache %p", page, this, page, this);
|
||||
}
|
||||
|
||||
if (page->State() == PAGE_STATE_MODIFIED) {
|
||||
// pages can't be freed in MODIFIED state
|
||||
page->modified = false;
|
||||
vm_page_set_state(page, PAGE_STATE_CACHED);
|
||||
}
|
||||
|
||||
// remove it
|
||||
pages.Remove(page);
|
||||
page->SetCacheRef(NULL);
|
||||
|
||||
Reference in New Issue
Block a user