]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: destroy reconnect msg when it is from non-existent session 28796/head
authorshenhang <shenhang@kuaishou.com>
Sun, 30 Jun 2019 01:56:29 +0000 (09:56 +0800)
committershenhang <shenhang@kuaishou.com>
Sun, 30 Jun 2019 02:32:52 +0000 (10:32 +0800)
fixes: http://tracker.ceph.com/issues/40588

This bug is from backporting "https://github.com/ceph/ceph/pull/27256"
On version mimic and luminous, the type of msg determines msg
has to be destroyed explictly.
Signed-off-by: Shen Hang <harryshen18@gmail.com>
src/mds/Server.cc

index e19f033cfe68b8ab5258a2b5bb6ea2a8a0716699..cb0868bf3cdda156c79dc95e87e1e8d90f0a9115 100644 (file)
@@ -1020,8 +1020,10 @@ void Server::handle_client_reconnect(MClientReconnect *m)
   dout(7) << "handle_client_reconnect " << m->get_source() << dendl;
   client_t from = m->get_source().num();
   Session *session = mds->get_session(m);
-  if (!session)
+  if (!session) {
+    m->put();
     return;
+  }
 
   if (!mds->is_reconnect() && mds->get_want_state() == CEPH_MDS_STATE_RECONNECT) {
     dout(10) << " we're almost in reconnect state (mdsmap delivery race?); waiting" << dendl;