From: myoungwon oh Date: Wed, 11 Oct 2017 16:43:37 +0000 (+0900) Subject: osd: fix reference a deleted item X-Git-Tag: v13.0.1~573^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e8bffab51abec20b31ceea61ecddbef4dbe26b1e;p=ceph-ci.git osd: fix reference a deleted item move() delete to_process' entries. This commit will prevent referencing a deleted item Signed-off-by: Myoungwon Oh --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 39404f7ddb0..9fbeaac3dbc 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -9488,14 +9488,14 @@ void OSD::ShardedOpWQ::wake_pg_waiters(spg_t pgid) dout(20) << __func__ << " " << pgid << " to_process " << p->second.to_process << " waiting_for_pg=" << (int)p->second.waiting_for_pg << dendl; + for (auto& q : p->second.to_process) { + pushes_to_free += q.get_reserved_pushes(); + } for (auto i = p->second.to_process.rbegin(); i != p->second.to_process.rend(); ++i) { sdata->_enqueue_front(std::move(*i), osd->op_prio_cutoff); } - for (auto& q : p->second.to_process) { - pushes_to_free += q.get_reserved_pushes(); - } p->second.to_process.clear(); p->second.waiting_for_pg = false; ++p->second.requeue_seq;