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:
parent
70bf426b8c
commit
ae21ddaf58
@ -13,6 +13,8 @@
|
||||
#include <KernelExport.h>
|
||||
#include <OS.h>
|
||||
|
||||
#include <AutoDeleter.h>
|
||||
|
||||
#include <arch/cpu.h>
|
||||
#include <arch/vm_translation_map.h>
|
||||
#include <block_cache.h>
|
||||
@ -1308,6 +1310,7 @@ steal_page(vm_page *page, bool stealActive)
|
||||
return false;
|
||||
|
||||
AutoLocker<VMCache> cacheLocker(page->cache, true, false);
|
||||
MethodDeleter<VMCache> _2(page->cache, &VMCache::ReleaseRefLocked);
|
||||
|
||||
// check again if that page is still a candidate
|
||||
if (page->state != PAGE_STATE_INACTIVE
|
||||
|
Loading…
Reference in New Issue
Block a user