]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: set mdr->in[n] in rdlock_path_xlock_dentry
authorSage Weil <sage@newdream.net>
Wed, 2 Dec 2009 20:00:19 +0000 (12:00 -0800)
committerSage Weil <sage@newdream.net>
Wed, 2 Dec 2009 20:00:19 +0000 (12:00 -0800)
This keeps things consistent with what we'd get with
path_traverse.  Namely, it means that if done_locking gets
set to true, then a future call to rdlock_path_pin_ref can
bail out and return mdr->in[n] and get a correct value.

This fixes

 touch mnt/a
 ls mnt
 touch mnt/.ceph

mds hang on the create request.

src/mds/Server.cc

index 69f154914d0144ebf5e23e59003dd38267a343d3..6663d5d357e638a77ddaf8aa037219abc3318178 100644 (file)
@@ -1752,6 +1752,7 @@ CDentry* Server::rdlock_path_xlock_dentry(MDRequest *mdr, int n,
   }
 
   mdr->dn[n].push_back(dn);
+  mdr->in[n] = dn->get_projected_linkage()->get_inode();
 
   // -- lock --
   for (int i=0; i<(int)mdr->dn[n].size(); i++)