]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG: use our already-found iterator instead of going back into map
authorGreg Farnum <greg@inktank.com>
Thu, 19 Sep 2013 00:49:17 +0000 (17:49 -0700)
committerGreg Farnum <greg@inktank.com>
Mon, 30 Sep 2013 21:49:36 +0000 (14:49 -0700)
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 <greg@inktank.com>
src/osd/ReplicatedPG.cc

index c826c38c14588f555b5a19598ddf3676cbc64773..88dc150448bc9d8ec1b3f4aed3465c0f2907e4e8 100644 (file)
@@ -5468,10 +5468,10 @@ void ReplicatedPG::kick_object_context_blocked(ObjectContextRef obc)
     return;
   }
 
-  list<OpRequestRef>& ls = waiting_for_blocked_object[soid];
+  list<OpRequestRef>& 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)