* 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:
@@ -1011,8 +1011,12 @@ page_writer(void* /*unused*/)
|
|||||||
InterruptsSpinLocker locker(sPageLock);
|
InterruptsSpinLocker locker(sPageLock);
|
||||||
|
|
||||||
// state might have change while we were locking the cache
|
// 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;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
remove_page_from_queue(&sModifiedPageQueue, page);
|
remove_page_from_queue(&sModifiedPageQueue, page);
|
||||||
page->state = PAGE_STATE_BUSY;
|
page->state = PAGE_STATE_BUSY;
|
||||||
|
|||||||
Reference in New Issue
Block a user