diff options
author | Greg Farnum <greg@inktank.com> | 2013-09-18 17:49:17 -0700 |
---|---|---|
committer | Greg Farnum <greg@inktank.com> | 2013-09-23 09:57:43 -0700 |
commit | d0b5ae8b7097744bdccf1b0dff673274d03e8a1f (patch) | |
tree | fe360266f39a6d803339d4d64fe6ae5960b4e951 | |
parent | 2299c4dbf23ff2360be266d92b6ad13ce31bf12b (diff) | |
download | ceph-d0b5ae8b7097744bdccf1b0dff673274d03e8a1f.tar.gz |
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 <greg@inktank.com>
-rw-r--r-- | src/osd/ReplicatedPG.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index a48372fe561..1e3bfa17bbf 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -5233,10 +5233,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) |