summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Just <sam.just@inktank.com>2013-02-25 12:36:29 -0800
committerSage Weil <sage@inktank.com>2013-03-04 13:53:59 -0800
commit9e4722595cf749f4735db92dd0d7a3039b4a24db (patch)
treeb37a3a8706d3a2c1426bdfd4f3e8af09eea611ad
parent3e596678fde87bc6083b9f0c1be72666ee8c8bc3 (diff)
downloadceph-9e4722595cf749f4735db92dd0d7a3039b4a24db.tar.gz
ReplicatedPG::C_OSD_CommittedPushedObject: use intrusive_ptr for pg
Signed-off-by: Samuel Just <sam.just@inktank.com> (cherry picked from commit 04ee8f478bbd587a711d0668c471cfc5c1cab06c)
-rw-r--r--src/osd/ReplicatedPG.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/osd/ReplicatedPG.h b/src/osd/ReplicatedPG.h
index 800477003dd..0277e7f4b38 100644
--- a/src/osd/ReplicatedPG.h
+++ b/src/osd/ReplicatedPG.h
@@ -883,18 +883,16 @@ protected:
}
};
struct C_OSD_CommittedPushedObject : public Context {
- ReplicatedPG *pg;
+ boost::intrusive_ptr<ReplicatedPG> pg;
OpRequestRef op;
epoch_t epoch;
eversion_t last_complete;
C_OSD_CommittedPushedObject(
ReplicatedPG *p, OpRequestRef o, epoch_t epoch, eversion_t lc) :
pg(p), op(o), epoch(epoch), last_complete(lc) {
- pg->get();
}
void finish(int r) {
pg->_committed_pushed_object(op, epoch, last_complete);
- pg->put();
}
};
struct C_OSD_CompletedPushedObjectReplica : public Context {