Putting an unused block will now trigger a panic.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21481 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+5
@@ -446,6 +446,11 @@ put_cached_block(block_cache *cache, cached_block *block)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (block->ref_count < 1) {
|
||||||
|
panic("Invalid ref_count for block %p, cache %p\n", block, cache);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (--block->ref_count == 0
|
if (--block->ref_count == 0
|
||||||
&& block->transaction == NULL
|
&& block->transaction == NULL
|
||||||
&& block->previous_transaction == NULL) {
|
&& block->previous_transaction == NULL) {
|
||||||
|
|||||||
Reference in New Issue
Block a user