File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -12323,8 +12323,8 @@ int Client::_getcwd(string& dir, const UserPerm& perms)
1232312323 filepath path;
1232412324 ldout (cct, 10 ) << __func__ << " " << *cwd << dendl;
1232512325
12326- Inode * in = cwd. get () ;
12327- while (in != root. get () ) {
12326+ auto in = cwd;
12327+ while (in != root) {
1232812328 ceph_assert (in->dentries .size () < 2 ); // dirs can't be hard-linked
1232912329
1233012330 // A cwd or ancester is unlinked
@@ -12348,11 +12348,14 @@ int Client::_getcwd(string& dir, const UserPerm& perms)
1234812348
1234912349 // start over
1235012350 path = filepath ();
12351- in = cwd. get () ;
12351+ in = cwd;
1235212352 continue ;
1235312353 }
12354- path.push_front_dentry (dn->name );
12355- in = dn->dir ->parent_inode ;
12354+ auto * diri = dn->dir ->parent_inode ;
12355+ ceph_assert (diri);
12356+ auto dname = _unwrap_name (*diri, dn->name , dn->alternate_name );
12357+ path.push_front_dentry (dname);
12358+ in = InodeRef (diri);
1235612359 }
1235712360 dir = " /" ;
1235812361 dir += path.get_path ();
You can’t perform that action at this time.
0 commit comments