Merge PR #38326 into master

* refs/pull/38326/head:
	client: cleanup the handle_mds_map() code

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
This commit is contained in:
Patrick Donnelly 2020-12-02 12:13:39 -08:00
commit 341913b220
No known key found for this signature in database
GPG Key ID: 3A2A7E25BEA8AADB

View File

@ -2776,8 +2776,6 @@ void Client::cancel_commands(const MDSMap& newmap)
void Client::handle_mds_map(const MConstRef<MMDSMap>& m)
{
mds_gid_t old_inc, new_inc;
std::unique_lock cl(client_lock);
if (m->get_epoch() <= mdsmap->get_epoch()) {
ldout(cct, 1) << __func__ << " epoch " << m->get_epoch()
@ -2806,8 +2804,8 @@ void Client::handle_mds_map(const MConstRef<MMDSMap>& m)
if (!mdsmap->is_up(mds)) {
session->con->mark_down();
} else if (mdsmap->get_addrs(mds) != session->addrs) {
old_inc = _mdsmap->get_incarnation(mds);
new_inc = mdsmap->get_incarnation(mds);
auto old_inc = _mdsmap->get_incarnation(mds);
auto new_inc = mdsmap->get_incarnation(mds);
if (old_inc != new_inc) {
ldout(cct, 1) << "mds incarnation changed from "
<< old_inc << " to " << new_inc << dendl;
@ -15100,7 +15098,7 @@ void intrusive_ptr_add_ref(Inode *in)
{
in->get();
}
void intrusive_ptr_release(Inode *in)
{
in->client->put_inode(in);