When proxy write comes back from base tier, the write op may or may not
sit at the front of the list.
Signed-off-by: Zhiqiang Wang <zhiqiang.wang@intel.com>
}
list<OpRequestRef>& in_progress_op = q->second;
assert(in_progress_op.size());
- OpRequestRef op = in_progress_op.front();
- assert(op == pwop->op);
- in_progress_op.pop_front();
+ list<OpRequestRef>::iterator it = std::find(in_progress_op.begin(),
+ in_progress_op.end(),
+ pwop->op);
+ assert(it != in_progress_op.end());
+ in_progress_op.erase(it);
if (in_progress_op.size() == 0) {
in_progress_proxy_ops.erase(oid);
}