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:
parent
4c7e2a45fa
commit
8491616029
5
src/system/kernel/cache/block_cache.cpp
vendored
5
src/system/kernel/cache/block_cache.cpp
vendored
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user