From 4ebf37b11a2f3b35b5cfed90450e6f99b8781517 Mon Sep 17 00:00:00 2001 From: shenhang Date: Sun, 30 Jun 2019 09:56:29 +0800 Subject: [PATCH] mds: destroy reconnect msg when it is from non-existent session 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 (cherry picked from commit 43ffd5b0acfaa0e246efc779e13da61dec5aa249) --- src/mds/Server.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mds/Server.cc b/src/mds/Server.cc index 2249d317300c..8854525376d3 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -1009,8 +1009,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; -- 2.47.3