mirror of
https://github.com/ceph/ceph
synced 2025-02-24 19:47:44 +00:00
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 <gregory.farnum@dreamhost.com>
This commit is contained in:
parent
7d19f184c5
commit
ac23196bc5
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user