From: Casey Bodley Date: Fri, 2 Sep 2016 18:13:19 +0000 (-0400) Subject: common: only call crypto::init once per CephContext X-Git-Tag: v10.2.4~77^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5d0e2f8690b08418fc404dc43df7a3a16ac83309;p=ceph.git common: only call crypto::init once per CephContext Fixes: http://tracker.ceph.com/issues/17205 Signed-off-by: Casey Bodley (cherry picked from commit 9dfc1537564c4ce65e4d0230a83f0d8d47503b16) --- diff --git a/src/common/ceph_context.cc b/src/common/ceph_context.cc index c8dab36dac6f..38a4e2012352 100644 --- a/src/common/ceph_context.cc +++ b/src/common/ceph_context.cc @@ -583,8 +583,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()