]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG::C_OSD_CommittedPushedObject: use intrusive_ptr for pg
authorSamuel Just <sam.just@inktank.com>
Mon, 25 Feb 2013 20:36:29 +0000 (12:36 -0800)
committerSage Weil <sage@inktank.com>
Mon, 4 Mar 2013 21:53:59 +0000 (13:53 -0800)
Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 04ee8f478bbd587a711d0668c471cfc5c1cab06c)

src/osd/ReplicatedPG.h

index 800477003dd53b3cc80cd3bcef21efdd7f8e40af..0277e7f4b382c856fa9ba35c7acf495bdf44ba9f 100644 (file)
@@ -883,18 +883,16 @@ protected:
     }
   };
   struct C_OSD_CommittedPushedObject : public Context {
-    ReplicatedPG *pg;
+    boost::intrusive_ptr<ReplicatedPG> 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 {