]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common: only call crypto::init once per CephContext 11409/head
authorCasey Bodley <cbodley@redhat.com>
Fri, 2 Sep 2016 18:13:19 +0000 (14:13 -0400)
committerLoic Dachary <ldachary@redhat.com>
Tue, 11 Oct 2016 08:22:18 +0000 (10:22 +0200)
Fixes: http://tracker.ceph.com/issues/17205
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 9dfc1537564c4ce65e4d0230a83f0d8d47503b16)

src/common/ceph_context.cc

index c8dab36dac6f1c7f034d745fe39306a5b85eb141..38a4e201235258e08349db4f865e24f11e8ef8c0 100644 (file)
@@ -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()