From: Greg Farnum Date: Thu, 19 Sep 2013 00:49:17 +0000 (-0700) Subject: ReplicatedPG: use our already-found iterator instead of going back into map X-Git-Tag: v0.71~60^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7f3165b52c7d33eb4417bed5d0f64a5be91f8d36;p=ceph.git ReplicatedPG: use our already-found iterator instead of going back into map We have an iterator pointing at the element we want; no need to search the map again in order to grab the element or remove it. Signed-off-by: Greg Farnum --- diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index c826c38c1458..88dc150448bc 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -5468,10 +5468,10 @@ void ReplicatedPG::kick_object_context_blocked(ObjectContextRef obc) return; } - list& ls = waiting_for_blocked_object[soid]; + list& ls = p->second; dout(10) << __func__ << " " << soid << " requeuing " << ls.size() << " requests" << dendl; requeue_ops(ls); - waiting_for_blocked_object.erase(soid); + waiting_for_blocked_object.erase(p); } SnapSetContext *ReplicatedPG::create_snapset_context(const object_t& oid)