Fix possible segfault on ENOSPC
This commit is contained in:
@@ -182,7 +182,8 @@ void blockstore_impl_t::cancel_all_writes(blockstore_op_t *op, blockstore_dirty_
|
|||||||
bool found = false;
|
bool found = false;
|
||||||
for (auto other_op: submit_queue)
|
for (auto other_op: submit_queue)
|
||||||
{
|
{
|
||||||
if (!found && other_op == op)
|
// <op> may be present in queue multiple times due to moving operations in submit_queue
|
||||||
|
if (other_op == op)
|
||||||
found = true;
|
found = true;
|
||||||
else if (found && other_op->oid == op->oid &&
|
else if (found && other_op->oid == op->oid &&
|
||||||
(other_op->opcode == BS_OP_WRITE || other_op->opcode == BS_OP_WRITE_STABLE))
|
(other_op->opcode == BS_OP_WRITE || other_op->opcode == BS_OP_WRITE_STABLE))
|
||||||
|
|||||||
Reference in New Issue
Block a user