From ff1521fce4a77c2836aa99bebccbbb8c239e60f8 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 1 Jul 2014 15:49:58 -0700 Subject: [PATCH] common/RefCountedObject: optionally take initial ref count to ctor Signed-off-by: Sage Weil --- src/common/RefCountedObj.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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() { -- 2.39.5