From f45a541365f1c77e9e1ffa410e44d342b0cb9975 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Wed, 17 Apr 2013 13:52:13 -0700 Subject: [PATCH] PG: use PGRef for FlushState Signed-off-by: Samuel Just --- src/osd/PG.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 6d2854dbf88b7..201d2d93d6347 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -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 FlushStateRef; -- 2.39.5