]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common/RefCountedObject: make nref, cct private
authorSage Weil <sage@inktank.com>
Tue, 1 Jul 2014 22:51:30 +0000 (15:51 -0700)
committerSage Weil <sage@inktank.com>
Thu, 3 Jul 2014 21:28:26 +0000 (14:28 -0700)
Signed-off-by: Sage Weil <sage@inktank.com>
src/common/RefCountedObj.h

index 395a43687343b525080e3477c4272e78fc811285..f9644a791cefdcf4b0c244e1d3f0f5b6aa772fb0 100644 (file)
 #include "common/ceph_context.h"
 
 struct RefCountedObject {
+private:
   atomic_t nref;
   CephContext *cct;
+public:
   RefCountedObject(CephContext *c = NULL, int n=1) : nref(n), cct(c) {}
   virtual ~RefCountedObject() {
     assert(nref.read() == 0);
@@ -45,6 +47,9 @@ struct RefCountedObject {
     if (v == 0)
       delete this;
   }
+  void set_cct(CephContext *c) {
+    cct = c;
+  }
 };
 
 /**