From: Sage Weil Date: Tue, 1 Jul 2014 22:49:58 +0000 (-0700) Subject: common/RefCountedObject: optionally take initial ref count to ctor X-Git-Tag: v0.84~148^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ff1521fce4a77c2836aa99bebccbbb8c239e60f8;p=ceph.git common/RefCountedObject: optionally take initial ref count to ctor Signed-off-by: Sage Weil --- diff --git a/src/common/RefCountedObj.h b/src/common/RefCountedObj.h index 84bd22f57b02b..ca405693081a9 100644 --- a/src/common/RefCountedObj.h +++ b/src/common/RefCountedObj.h @@ -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() {