diff options
author | Greg Farnum <greg@inktank.com> | 2013-09-19 16:50:34 -0700 |
---|---|---|
committer | Greg Farnum <greg@inktank.com> | 2013-09-19 18:15:00 -0700 |
commit | ef1d62b4122c52777b7f9e363857210a4d86b942 (patch) | |
tree | 8fc3f6b700c1c6586925b9cd59d0faa50e884a50 | |
parent | c2934655dd9bee85806e0c418544f89eb915c88a (diff) | |
download | ceph-ef1d62b4122c52777b7f9e363857210a4d86b942.tar.gz |
OpTracker: include a destructor for the TrackedOp base class.
Our method of handling the OpRequest destructor is a little weird,
but we're about to get rid of the request member finagling.
Signed-off-by: Greg Farnum <greg@inktank.com>
-rw-r--r-- | src/common/TrackedOp.h | 2 | ||||
-rw-r--r-- | src/osd/OpRequest.h | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/common/TrackedOp.h b/src/common/TrackedOp.h index b10485528ab..59e3c6288cc 100644 --- a/src/common/TrackedOp.h +++ b/src/common/TrackedOp.h @@ -141,7 +141,7 @@ protected: virtual void init_from_message() {}; public: - virtual ~TrackedOp() {} + virtual ~TrackedOp() { if (request) request->put(); } utime_t get_arrived() const { return received_time; diff --git a/src/osd/OpRequest.h b/src/osd/OpRequest.h index 18bfe1a1d07..6d572e0f015 100644 --- a/src/osd/OpRequest.h +++ b/src/osd/OpRequest.h @@ -78,6 +78,7 @@ public: ~OpRequest() { assert(request); request->put(); + request = NULL; } bool been_queued_for_pg() { return hit_flag_points & flag_queued_for_pg; } |