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: v11.0.1~241^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9dfc1537564c4ce65e4d0230a83f0d8d47503b16;p=ceph.git common: only call crypto::init once per CephContext Fixes: http://tracker.ceph.com/issues/17205 Signed-off-by: Casey Bodley --- 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()