]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
PG: use PGRef for FlushState
authorSamuel Just <sam.just@inktank.com>
Wed, 17 Apr 2013 20:52:13 +0000 (13:52 -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 6d2854dbf88b7a922de83ad62dfadae409676aeb..201d2d93d634791cd6ec8efbcb0454323405dd1f 100644 (file)
@@ -4814,16 +4814,13 @@ void PG::set_last_peering_reset()
 }
 
 struct FlushState {
-  PG *pg;
+  PGRef pg;
   epoch_t epoch;
-  FlushState(PG *pg, epoch_t epoch) : pg(pg), epoch(epoch) {
-    pg->get();
-  }
+  FlushState(PG *pg, epoch_t epoch) : pg(pg), epoch(epoch) {}
   ~FlushState() {
     pg->lock();
     pg->queue_flushed(epoch);
     pg->unlock();
-    pg->put();
   }
 };
 typedef std::tr1::shared_ptr<FlushState> FlushStateRef;