From: shenhang Date: Sun, 30 Jun 2019 01:56:29 +0000 (+0800) Subject: mds: destroy reconnect msg when it is from non-existent session X-Git-Tag: v13.2.7~264^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=43ffd5b0acfaa0e246efc779e13da61dec5aa249;p=ceph.git 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 --- diff --git a/src/mds/Server.cc b/src/mds/Server.cc index e19f033cfe68..cb0868bf3cdd 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -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;