[block-cache] tweak when validators are swapped

Makes it more consitent in the face of exceptions
This commit is contained in:
Joe Thornber 2014-08-21 14:23:14 +01:00
parent 6f760ccd87
commit b493a30b65

View File

@ -577,8 +577,6 @@ block_cache::lookup_or_read_block(block_address index, unsigned flags,
b = new_block(index);
if (b) {
b->v_ = v;
if (flags & GF_ZERO)
zero_block(*b);
else {
@ -586,6 +584,8 @@ block_cache::lookup_or_read_block(block_address index, unsigned flags,
wait_specific(*b);
v->check(b->data_, b->index_);
}
b->v_ = v;
}
}