]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librados: update Objecter shutdown
authorJohn Spray <john.spray@redhat.com>
Wed, 13 Aug 2014 01:19:22 +0000 (02:19 +0100)
committerJohn Spray <john.spray@redhat.com>
Mon, 25 Aug 2014 00:34:18 +0000 (01:34 +0100)
Previously checking for CONNECTED was equivalent to
checking the objecter had been initialized, but since
the separation between init() and start() that is
no longer the case.  Avoid the need to be smart by
just readint Objecter::initialized to learn whether
to call Objecter::shutdown

Fixes: #9067
Signed-off-by: John Spray <john.spray@redhat.com>
src/librados/RadosClient.cc

index f59cca963cef4c47186fca86220391a4c18ea546..7fddcdebd03a5280886c92429177c1bc199ba31e 100644 (file)
@@ -280,7 +280,7 @@ void librados::RadosClient::shutdown()
     finisher.stop();
   }
   bool need_objecter = false;
-  if (objecter && state == CONNECTED) {
+  if (objecter && objecter->initialized.read()) {
     need_objecter = true;
   }
   state = DISCONNECTED;