An unused dirty block would put again into the unused list.

* This could cause bug #8123. While this fixes the crash, one underlying
  problem is still there, as dirty blocks should never leave a transaction.
This commit is contained in:
Andreas Henriksson
2012-07-19 23:44:25 +02:00
committed by Axel Dörfler
parent 03aa456e2e
commit 8959a4e0c3
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -927,7 +927,7 @@ write_cached_block(block_cache* cache, cached_block* block,
}
}
}
if (block->transaction == NULL && block->ref_count == 0) {
if (block->transaction == NULL && block->ref_count == 0 && !block->unused) {
// the block is no longer used
block->unused = true;
cache->unused_blocks.Add(block);