]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ReplicatedPG: use ReplicatedPGRef for C_OSD_OpCommit
authorSamuel Just <sam.just@inktank.com>
Wed, 17 Apr 2013 21:05:18 +0000 (14:05 -0700)
committerSamuel Just <sam.just@inktank.com>
Fri, 19 Apr 2013 18:00:22 +0000 (11:00 -0700)
Signed-off-by: Samuel Just <sam.just@inktank.com>
src/osd/ReplicatedPG.cc

index 049dde3cb1e358d6620fc836b7d0420a8ed6a5a0..3c019afbee1741095e61fae9252246627b3167e2 100644 (file)
@@ -3710,17 +3710,15 @@ public:
 
 class C_OSD_OpCommit : public Context {
 public:
-  ReplicatedPG *pg;
+  ReplicatedPGRef pg;
   ReplicatedPG::RepGather *repop;
 
   C_OSD_OpCommit(ReplicatedPG *p, ReplicatedPG::RepGather *rg) :
     pg(p), repop(rg) {
     repop->get();
-    pg->get();    // we're copying the pointer
   }
   void finish(int r) {
     pg->op_commit(repop);
-    pg->put();
   }
 };