From 9dfc1537564c4ce65e4d0230a83f0d8d47503b16 Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Fri, 2 Sep 2016 14:13:19 -0400 Subject: [PATCH] common: only call crypto::init once per CephContext Fixes: http://tracker.ceph.com/issues/17205 Signed-off-by: Casey Bodley --- src/common/ceph_context.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/common/ceph_context.cc b/src/common/ceph_context.cc index b4cb9cabe206..1d677e3e3825 100644 --- a/src/common/ceph_context.cc +++ b/src/common/ceph_context.cc @@ -599,8 +599,10 @@ void CephContext::put() { void CephContext::init_crypto() { - ceph::crypto::init(this); - _crypto_inited = true; + if (!_crypto_inited) { + ceph::crypto::init(this); + _crypto_inited = true; + } } void CephContext::start_service_thread() -- 2.47.3