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:
Axel Dörfler 2007-06-21 12:35:39 +00:00
parent 4c7e2a45fa
commit 8491616029

View File

@ -446,6 +446,11 @@ put_cached_block(block_cache *cache, cached_block *block)
}
#endif
if (block->ref_count < 1) {
panic("Invalid ref_count for block %p, cache %p\n", block, cache);
return;
}
if (--block->ref_count == 0
&& block->transaction == NULL
&& block->previous_transaction == NULL) {