]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
RadosClient: shutdown monclient after dropping lock
authorSamuel Just <sam.just@inktank.com>
Thu, 8 Aug 2013 22:12:46 +0000 (15:12 -0700)
committerSage Weil <sage@inktank.com>
Fri, 9 Aug 2013 05:40:53 +0000 (22:40 -0700)
Otherwise, the monclient shutdown may deadlock waiting
on a context trying to take the RadosClient lock.

Fixes: #5897
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
src/librados/RadosClient.cc

index e8dd019af3a285b5f9641370a0f061cd2b140f77..48b6a3cabf60fdd27898255cb86c5fcd879be770 100644 (file)
@@ -229,7 +229,6 @@ void librados::RadosClient::shutdown()
   if (state == CONNECTED) {
     finisher.stop();
   }
-  monclient.shutdown();
   bool need_objecter = false;
   if (objecter && state == CONNECTED) {
     need_objecter = true;
@@ -238,6 +237,7 @@ void librados::RadosClient::shutdown()
   state = DISCONNECTED;
   timer.shutdown();   // will drop+retake lock
   lock.Unlock();
+  monclient.shutdown();
   if (need_objecter)
     objecter->shutdown_unlocked();
   if (messenger) {