]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
PG: use PGRef for C_PG_FinishRecovery
authorSamuel Just <sam.just@inktank.com>
Wed, 17 Apr 2013 20:51:36 +0000 (13:51 -0700)
committerSamuel Just <sam.just@inktank.com>
Fri, 19 Apr 2013 18:00:21 +0000 (11:00 -0700)
Signed-off-by: Samuel Just <sam.just@inktank.com>
src/osd/PG.cc

index bd14f8eef7c03d03bb5a87e3248853cc8cd33e83..6d2854dbf88b7a922de83ad62dfadae409676aeb 100644 (file)
@@ -1858,10 +1858,8 @@ bool PG::queue_scrub()
 }
 
 struct C_PG_FinishRecovery : public Context {
-  PG *pg;
-  C_PG_FinishRecovery(PG *p) : pg(p) {
-    pg->get();
-  }
+  PGRef pg;
+  C_PG_FinishRecovery(PG *p) : pg(p) {}
   void finish(int r) {
     pg->_finish_recovery(this);
   }
@@ -1920,7 +1918,6 @@ void PG::_finish_recovery(Context *c)
     dout(10) << "_finish_recovery -- stale" << dendl;
   }
   unlock();
-  put();
 }
 
 void PG::start_recovery_op(const hobject_t& soid)