[block-cache] writeback could get stuck in a loop
If a block had a non zero ref count.
This commit is contained in:
parent
dfd066e59e
commit
a45ffd896a
@ -265,13 +265,11 @@ block_cache::writeback(unsigned count)
|
|||||||
if (actual == count)
|
if (actual == count)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// The block may be on the dirty list from a prior
|
// We can't writeback anything that's still in use.
|
||||||
// acquisition.
|
if (!it->ref_count_) {
|
||||||
if (it->ref_count_)
|
issue_write(*it);
|
||||||
continue;
|
actual++;
|
||||||
|
}
|
||||||
issue_write(*it);
|
|
||||||
actual++;
|
|
||||||
|
|
||||||
it = next;
|
it = next;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user