]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: cleanup Server::rdlock_path_xlock_dentry
authorYan, Zheng <zyan@redhat.com>
Fri, 23 Dec 2016 11:12:18 +0000 (19:12 +0800)
committerYan, Zheng <zyan@redhat.com>
Tue, 10 Jan 2017 07:23:34 +0000 (15:23 +0800)
Signed-off-by: Yan, Zheng <zyan@redhat.com>
src/mds/Server.cc

index 1e8f4177711139440da9e3518d69e6bc3a79cb74..88ded97796f4b4f48a05f2aa39e8c14966661516 100644 (file)
@@ -2661,13 +2661,14 @@ CDentry* Server::rdlock_path_xlock_dentry(MDRequestRef& mdr, int n,
   }
 
   mdr->dn[n].push_back(dn);
-  mdr->in[n] = dn->get_projected_linkage()->get_inode();
+  CDentry::linkage_t *dnl = dn->get_linkage(client, mdr);
+  mdr->in[n] = dnl->get_inode();
 
   // -- lock --
   // NOTE: rename takes the same set of locks for srcdn
   for (int i=0; i<(int)mdr->dn[n].size(); i++) 
     rdlocks.insert(&mdr->dn[n][i]->lock);
-  if (alwaysxlock || dn->get_linkage(client, mdr)->is_null())
+  if (alwaysxlock || dnl->is_null())
     xlocks.insert(&dn->lock);                 // new dn, xlock
   else
     rdlocks.insert(&dn->lock);  // existing dn, rdlock