From: Samuel Just Date: Mon, 25 Feb 2013 20:36:29 +0000 (-0800) Subject: ReplicatedPG::C_OSD_CommittedPushedObject: use intrusive_ptr for pg X-Git-Tag: v0.59~104^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=04ee8f478bbd587a711d0668c471cfc5c1cab06c;p=ceph.git ReplicatedPG::C_OSD_CommittedPushedObject: use intrusive_ptr for pg Signed-off-by: Samuel Just --- diff --git a/src/osd/ReplicatedPG.h b/src/osd/ReplicatedPG.h index 87225ff7d057..701b537c5074 100644 --- a/src/osd/ReplicatedPG.h +++ b/src/osd/ReplicatedPG.h @@ -790,18 +790,16 @@ protected: } }; struct C_OSD_CommittedPushedObject : public Context { - ReplicatedPG *pg; + boost::intrusive_ptr pg; OpRequestRef op; epoch_t epoch; eversion_t last_complete; C_OSD_CommittedPushedObject( ReplicatedPG *p, OpRequestRef o, epoch_t epoch, eversion_t lc) : pg(p), op(o), epoch(epoch), last_complete(lc) { - pg->get(); } void finish(int r) { pg->_committed_pushed_object(op, epoch, last_complete); - pg->put(); } }; struct C_OSD_CompletedPushedObjectReplica : public Context {