Minor refactoring.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23319 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2008-01-09 18:39:42 +00:00
parent bcb71f00e8
commit 34dafb6352

View File

@ -664,10 +664,10 @@ set_page_state_nolock(vm_page *page, int pageState)
if (pageState != PAGE_STATE_INACTIVE && page->cache != NULL)
panic("to be freed page %p has cache", page);
}
if (page->cache != NULL) {
if (pageState == PAGE_STATE_MODIFIED && page->cache->temporary)
if (page->cache != NULL && page->cache->temporary) {
if (pageState == PAGE_STATE_MODIFIED)
sModifiedTemporaryPages++;
else if (page->state == PAGE_STATE_MODIFIED && page->cache->temporary)
else if (page->state == PAGE_STATE_MODIFIED)
sModifiedTemporaryPages--;
}