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
This commit is contained in:
+1
-2
@@ -2189,7 +2189,7 @@ block_cache_delete(void *_cache, bool allowWrites)
|
|||||||
if (allowWrites)
|
if (allowWrites)
|
||||||
block_cache_sync(cache);
|
block_cache_sync(cache);
|
||||||
|
|
||||||
MutexLocker locker(&cache->lock);
|
mutex_lock(&cache->lock);
|
||||||
|
|
||||||
// free all blocks
|
// free all blocks
|
||||||
|
|
||||||
@@ -2209,7 +2209,6 @@ block_cache_delete(void *_cache, bool allowWrites)
|
|||||||
delete transaction;
|
delete transaction;
|
||||||
}
|
}
|
||||||
|
|
||||||
locker.Unlock();
|
|
||||||
delete cache;
|
delete cache;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user