mirror of
https://review.haiku-os.org/haiku
synced 2025-01-21 22:04:49 +01:00
* 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:
parent
b75f915a2e
commit
7b67df9c06
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user