]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
msg/SimpleMessenger: drop local_conneciton priv link on shutdwon
authorSage Weil <sage@redhat.com>
Fri, 25 Jul 2014 01:22:22 +0000 (18:22 -0700)
committerSage Weil <sage@redhat.com>
Fri, 25 Jul 2014 01:22:22 +0000 (18:22 -0700)
This breaks ref cycles between the local_connection and session, and let's
us drop the explicit set_priv() calls in OSD::shutdown().

Signed-off-by: Sage Weil <sage@redhat.com>
src/msg/SimpleMessenger.cc
src/osd/OSD.cc

index 3962d3bc09211c8a521d1f639882c66943f6acda..19de925774909b31be8083668f6ae6b6355f75be 100644 (file)
@@ -86,6 +86,9 @@ int SimpleMessenger::shutdown()
   ldout(cct,10) << "shutdown " << get_myaddr() << dendl;
   mark_down_all();
   dispatch_queue.shutdown();
+
+  // break ref cycles on the loopback connection
+  local_connection->set_priv(NULL);
   return 0;
 }
 
index 1a5a395cc9d907c485042661506fa8e48502fdf1..6f59dbfb976de395196a70486c0362139ec31a9a 100644 (file)
@@ -1787,10 +1787,6 @@ int OSD::shutdown()
   service.shutdown();
   op_tracker.on_shutdown();
 
-  // zap the Sessions for any loopback Connections
-  client_messenger->get_loopback_connection()->set_priv(NULL);
-  cluster_messenger->get_loopback_connection()->set_priv(NULL);
-
   class_handler->shutdown();
   client_messenger->shutdown();
   cluster_messenger->shutdown();