From: Greg Farnum Date: Wed, 27 Apr 2011 23:22:33 +0000 (-0700) Subject: MDS: fix handle_client_rename use of path_traverse. X-Git-Tag: v0.28~113 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ac23196bc5c1333b49226580afe962727c47c1ca;p=ceph.git MDS: fix handle_client_rename use of path_traverse. 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 --- diff --git a/src/mds/Server.cc b/src/mds/Server.cc index 18b002fec1ec..c4518ac923b1 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -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) {