]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
MDS: fix handle_client_rename use of path_traverse.
authorGreg Farnum <gregory.farnum@dreamhost.com>
Wed, 27 Apr 2011 23:22:33 +0000 (16:22 -0700)
committerGreg Farnum <gregory.farnum@dreamhost.com>
Mon, 2 May 2011 20:16:35 +0000 (13:16 -0700)
It was using the MDS_TRAVERSE_DISCOVERXLOCK flag, which allows
path_traverse to return success if it encounters a NULL dentry. When
we're looking for a source inode, though, that doesn't work out! We
want MDS_TRAVERSE_DISCOVER, which will go away and look for the dentry
on other inodes but requires a linked dentry, not a NULL one.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
src/mds/Server.cc

index 18b002fec1eccd9683927262f183b7bbd770d252..c4518ac923b18e4ad3715c263b5709ce7951836c 100644 (file)
@@ -4605,7 +4605,7 @@ void Server::handle_client_rename(MDRequest *mdr)
   CDir *destdir = destdn->get_dir();
   assert(destdir->is_auth());
 
-  int r = mdcache->path_traverse(mdr, NULL, NULL, srcpath, &srctrace, NULL, MDS_TRAVERSE_DISCOVERXLOCK);
+  int r = mdcache->path_traverse(mdr, NULL, NULL, srcpath, &srctrace, NULL, MDS_TRAVERSE_DISCOVER);
   if (r > 0)
     return; // delayed
   if (r < 0) {