This was missed in the path_walk refactor. readdir is not the only way to "get"
dentry names.
Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
(cherry picked from commit
cda2a6e6facb24eba96afb51341720336febdd54)
filepath path;
ldout(cct, 10) << __func__ << " " << *cwd << dendl;
- Inode *in = cwd.get();
- while (in != root.get()) {
+ auto in = cwd;
+ while (in != root) {
ceph_assert(in->dentries.size() < 2); // dirs can't be hard-linked
// A cwd or ancester is unlinked
// start over
path = filepath();
- in = cwd.get();
+ in = cwd;
continue;
}
- path.push_front_dentry(dn->name);
- in = dn->dir->parent_inode;
+ auto* diri = dn->dir->parent_inode;
+ ceph_assert(diri);
+ auto dname = _unwrap_name(*diri, dn->name, dn->alternate_name);
+ path.push_front_dentry(dname);
+ in = InodeRef(diri);
}
dir = "/";
dir += path.get_path();