]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: switch to mdr->get_client()
authorXiubo Li <xiubli@redhat.com>
Tue, 18 May 2021 05:43:29 +0000 (13:43 +0800)
committerXiubo Li <xiubli@redhat.com>
Thu, 20 May 2021 01:22:41 +0000 (09:22 +0800)
The get_client() will check the mdr's type, if not a client request
it will return -1.

Signed-off-by: Xiubo Li <xiubli@redhat.com>
src/mds/MDCache.cc

index 7fd265fefce775428808cbbbe97aeeeb3d48ad61..b6471dcb6be27dbe295c60f79291a8aae32e64c7 100644 (file)
@@ -8147,7 +8147,7 @@ int MDCache::path_traverse(MDRequestRef& mdr, MDSContextFactory& cf,
   if (mdr)
     mdr->snapid = snapid;
 
-  client_t client = (mdr && mdr->reqid.name.is_client()) ? mdr->reqid.name.num() : -1;
+  client_t client = mdr ? mdr->get_client() : -1;
 
   if (mds->logger) mds->logger->inc(l_mds_traverse);