summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Just <sam.just@inktank.com>2013-04-17 14:05:02 -0700
committerSamuel Just <sam.just@inktank.com>2013-04-19 11:00:22 -0700
commit8fe1b9d5a360c1784a9a54588126acb61cac27a9 (patch)
tree8f469a73b566af5170dbbdc563b3bb887bbb3f0a
parentc04c3e59ecb8a9c04606c60d8764451756806d16 (diff)
downloadceph-8fe1b9d5a360c1784a9a54588126acb61cac27a9.tar.gz
ReplicatedPG: use ReplicatedPGRef for C_OSD_OpApplied
Signed-off-by: Samuel Just <sam.just@inktank.com>
-rw-r--r--src/osd/ReplicatedPG.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc
index 50a747e330c..049dde3cb1e 100644
--- a/src/osd/ReplicatedPG.cc
+++ b/src/osd/ReplicatedPG.cc
@@ -3696,17 +3696,15 @@ int ReplicatedPG::prepare_transaction(OpContext *ctx)
class C_OSD_OpApplied : public Context {
public:
- ReplicatedPG *pg;
+ ReplicatedPGRef pg;
ReplicatedPG::RepGather *repop;
C_OSD_OpApplied(ReplicatedPG *p, ReplicatedPG::RepGather *rg) :
pg(p), repop(rg) {
repop->get();
- pg->get(); // we're copying the pointer
}
void finish(int r) {
pg->op_applied(repop);
- pg->put();
}
};