]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common: only call crypto::init once per CephContext 10965/head
authorCasey Bodley <cbodley@redhat.com>
Fri, 2 Sep 2016 18:13:19 +0000 (14:13 -0400)
committerCasey Bodley <cbodley@redhat.com>
Fri, 2 Sep 2016 18:36:16 +0000 (14:36 -0400)
Fixes: http://tracker.ceph.com/issues/17205
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/common/ceph_context.cc

index b4cb9cabe2060fa6facd4c32008e1155d9e332d3..1d677e3e38253fc4e08b0ba96694c9650e8c8ec0 100644 (file)
@@ -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()