]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common/RefCountedObject: optionally take initial ref count to ctor
authorSage Weil <sage@inktank.com>
Tue, 1 Jul 2014 22:49:58 +0000 (15:49 -0700)
committerSage Weil <sage@inktank.com>
Thu, 3 Jul 2014 21:28:25 +0000 (14:28 -0700)
Signed-off-by: Sage Weil <sage@inktank.com>
src/common/RefCountedObj.h

index 84bd22f57b02b038da87272cb723081b14cff0c6..ca405693081a9300f8f62a25046074da8fcb99a0 100644 (file)
@@ -23,7 +23,7 @@
 struct RefCountedObject {
   atomic_t nref;
   CephContext *cct;
-  RefCountedObject(CephContext *c = NULL) : nref(1), cct(c) {}
+  RefCountedObject(CephContext *c = NULL, int n=1) : nref(n), cct(c) {}
   virtual ~RefCountedObject() {}
   
   RefCountedObject *get() {