From 036cf4dd20cbfbd11631dcc62f75a02e709f53b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Mon, 12 May 2008 12:56:59 +0000 Subject: [PATCH] block_cache_delete(): only lock the cache mutex and avoid MutexLocker. the mutex is destroyed in the destructor. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25467 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/cache/block_cache.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/system/kernel/cache/block_cache.cpp b/src/system/kernel/cache/block_cache.cpp index 2e4e094ab8..971efd7938 100644 --- a/src/system/kernel/cache/block_cache.cpp +++ b/src/system/kernel/cache/block_cache.cpp @@ -2189,7 +2189,7 @@ block_cache_delete(void *_cache, bool allowWrites) if (allowWrites) block_cache_sync(cache); - MutexLocker locker(&cache->lock); + mutex_lock(&cache->lock); // free all blocks @@ -2209,7 +2209,6 @@ block_cache_delete(void *_cache, bool allowWrites) delete transaction; } - locker.Unlock(); delete cache; }