steal_pages() was leaking a cache reference since r26572, i.e caches
locked there would be leaked eventually. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27228 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -13,6 +13,8 @@
|
|||||||
#include <KernelExport.h>
|
#include <KernelExport.h>
|
||||||
#include <OS.h>
|
#include <OS.h>
|
||||||
|
|
||||||
|
#include <AutoDeleter.h>
|
||||||
|
|
||||||
#include <arch/cpu.h>
|
#include <arch/cpu.h>
|
||||||
#include <arch/vm_translation_map.h>
|
#include <arch/vm_translation_map.h>
|
||||||
#include <block_cache.h>
|
#include <block_cache.h>
|
||||||
@@ -1308,6 +1310,7 @@ steal_page(vm_page *page, bool stealActive)
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
AutoLocker<VMCache> cacheLocker(page->cache, true, false);
|
AutoLocker<VMCache> cacheLocker(page->cache, true, false);
|
||||||
|
MethodDeleter<VMCache> _2(page->cache, &VMCache::ReleaseRefLocked);
|
||||||
|
|
||||||
// check again if that page is still a candidate
|
// check again if that page is still a candidate
|
||||||
if (page->state != PAGE_STATE_INACTIVE
|
if (page->state != PAGE_STATE_INACTIVE
|
||||||
|
|||||||
Reference in New Issue
Block a user