]> 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)
committerDan van der Ster <daniel.vanderster@cern.ch>
Fri, 25 Feb 2022 08:16:22 +0000 (09:16 +0100)
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>
(cherry picked from commit 4357fa8028f320e973644b7b74aedab567afde2e)

src/mds/MDCache.cc

index adf46a839e61e4d760eb1d7bef06a7b38e4e886a..543e3428dccf2c6189f536ab82b0a361e40516b9 100644 (file)
@@ -8211,7 +8211,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);