Don't announce page access before being sure that the page isn't busy. Fixes

the erroneously trigger panic() in #5216.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34958 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2010-01-08 20:39:08 +00:00
parent b01f92ebd1
commit 2a30aab6f4

View File

@ -1659,17 +1659,16 @@ vm_page_write_modified_page_range(struct VMCache* cache, uint32 firstPage,
bool dequeuedPage = false;
if (page != NULL) {
DEBUG_PAGE_ACCESS_START(page);
if (page->state == PAGE_STATE_MODIFIED) {
DEBUG_PAGE_ACCESS_START(page);
AutoLocker<VMPageQueue> locker(sModifiedPageQueue);
sModifiedPageQueue.Remove(page);
dequeuedPage = true;
} else if (page->state == PAGE_STATE_BUSY
|| !vm_test_map_modification(page)) {
DEBUG_PAGE_ACCESS_END(page);
page = NULL;
}
} else
DEBUG_PAGE_ACCESS_START(page);
}
PageWriteWrapper* wrapper = NULL;