From: Xiubo Li Date: Fri, 27 Nov 2020 03:19:28 +0000 (+0800) Subject: client: cleanup the handle_mds_map() code X-Git-Tag: v16.1.0~401^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=be94c9b5244dc475f3f85a2362679244170d01cc;p=ceph.git client: cleanup the handle_mds_map() code Signed-off-by: Xiubo Li --- diff --git a/src/client/Client.cc b/src/client/Client.cc index 00eb11789f1e..4320aebbc8e2 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -2776,8 +2776,6 @@ void Client::cancel_commands(const MDSMap& newmap) void Client::handle_mds_map(const MConstRef& 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& 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; @@ -15149,7 +15147,7 @@ void intrusive_ptr_add_ref(Inode *in) { in->get(); } - + void intrusive_ptr_release(Inode *in) { in->client->put_inode(in);