* Fix cache reference leak

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26110 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Salvatore Benedetto 2008-06-23 20:13:25 +00:00
parent b75f915a2e
commit 7b67df9c06

View File

@ -1011,8 +1011,12 @@ page_writer(void* /*unused*/)
InterruptsSpinLocker locker(sPageLock);
// state might have change while we were locking the cache
if (page->state != PAGE_STATE_MODIFIED)
if (page->state != PAGE_STATE_MODIFIED) {
// release the cache reference first
if (cache->store->ops->release_ref != NULL)
cache->store->ops->release_ref(cache->store);
continue;
}
remove_page_from_queue(&sModifiedPageQueue, page);
page->state = PAGE_STATE_BUSY;