[block-cache] When changing validators the new validator check fn was only being called if the block was dirty.

This commit is contained in:
Joe Thornber 2014-08-21 14:22:14 +01:00
parent b5a9cd6043
commit 6f760ccd87
1 changed files with 3 additions and 4 deletions

View File

@ -564,10 +564,9 @@ block_cache::lookup_or_read_block(block_address index, unsigned flags,
if (flags & GF_ZERO)
zero_block(*b);
else {
if (b->v_.get() &&
b->v_.get() != v.get() &&
b->test_flags(BF_DIRTY)) {
b->v_->prepare(b->data_, b->index_);
if (b->v_.get() != v.get()) {
if (b->test_flags(BF_DIRTY))
b->v_->prepare(b->data_, b->index_);
v->check(b->data_, b->index_);
}
}