diff options
author | Samuel Just <sam.just@inktank.com> | 2013-04-17 13:52:13 -0700 |
---|---|---|
committer | Samuel Just <sam.just@inktank.com> | 2013-04-19 11:00:21 -0700 |
commit | f45a541365f1c77e9e1ffa410e44d342b0cb9975 (patch) | |
tree | 16f5a12c8f838e1ced2955c80ace3175b2bad59e | |
parent | 2f9a35ac3d88027a95511b14c0bf973df01778c7 (diff) | |
download | ceph-f45a541365f1c77e9e1ffa410e44d342b0cb9975.tar.gz |
PG: use PGRef for FlushState
Signed-off-by: Samuel Just <sam.just@inktank.com>
-rw-r--r-- | src/osd/PG.cc | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 6d2854dbf88..201d2d93d63 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<FlushState> FlushStateRef; |