From 7f3165b52c7d33eb4417bed5d0f64a5be91f8d36 Mon Sep 17 00:00:00 2001 From: Greg Farnum Date: Wed, 18 Sep 2013 17:49:17 -0700 Subject: [PATCH] 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 --- src/osd/ReplicatedPG.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index c826c38c14588..88dc150448bc9 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) -- 2.39.5