From 25eb99d309ac2d13ac4e7dccf973250ca844c781 Mon Sep 17 00:00:00 2001 From: Patrick Donnelly Date: Wed, 19 Mar 2025 21:25:35 -0400 Subject: [PATCH] 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: e08210dda01f4e154561fcf008084e6d640e4683 Signed-off-by: Patrick Donnelly --- src/client/Client.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/client/Client.cc b/src/client/Client.cc index 4d864873eb1..309456403b3 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -13315,9 +13315,7 @@ int Client::ll_walk(const char* name, Inode **out, struct ceph_statx *stx, if (!mref_reader.is_state_satisfied()) return -ENOTCONN; - filepath fp(name, 0); InodeRef in; - int rc; unsigned mask = statx_to_mask(flags, want); ldout(cct, 3) << __func__ << " " << name << dendl; @@ -13325,8 +13323,7 @@ int Client::ll_walk(const char* name, Inode **out, struct ceph_statx *stx, tout(cct) << name << std::endl; std::scoped_lock lock(client_lock); - rc = path_walk(cwd, fp, &in, perms, {.followsym = !(flags & AT_SYMLINK_NOFOLLOW), .mask = mask}); - if (rc < 0) { + if (int rc = path_walk(cwd, filepath(name), &in, perms, {.followsym = !(flags & AT_SYMLINK_NOFOLLOW), .mask = mask}); rc < 0) { /* zero out mask, just in case... */ stx->stx_mask = 0; stx->stx_ino = 0; -- 2.39.5