Skip to content

Commit 25eb99d

Browse files
committed
client: process path without inode anchor
ll_walk was wrongly coded to make the input file path relative to ino=0. That inode does not exist and isn't considered the root inode. Fixes: https://tracker.ceph.com/issues/70573 Fixes: e08210d Signed-off-by: Patrick Donnelly <[email protected]>
1 parent 0306789 commit 25eb99d

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/client/Client.cc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13315,18 +13315,15 @@ int Client::ll_walk(const char* name, Inode **out, struct ceph_statx *stx,
1331513315
if (!mref_reader.is_state_satisfied())
1331613316
return -ENOTCONN;
1331713317

13318-
filepath fp(name, 0);
1331913318
InodeRef in;
13320-
int rc;
1332113319
unsigned mask = statx_to_mask(flags, want);
1332213320

1332313321
ldout(cct, 3) << __func__ << " " << name << dendl;
1332413322
tout(cct) << __func__ << std::endl;
1332513323
tout(cct) << name << std::endl;
1332613324

1332713325
std::scoped_lock lock(client_lock);
13328-
rc = path_walk(cwd, fp, &in, perms, {.followsym = !(flags & AT_SYMLINK_NOFOLLOW), .mask = mask});
13329-
if (rc < 0) {
13326+
if (int rc = path_walk(cwd, filepath(name), &in, perms, {.followsym = !(flags & AT_SYMLINK_NOFOLLOW), .mask = mask}); rc < 0) {
1333013327
/* zero out mask, just in case... */
1333113328
stx->stx_mask = 0;
1333213329
stx->stx_ino = 0;

0 commit comments

Comments
 (0)