From 7b2a638ce9b74b9b2945e6dd969d48d3411b9ad8 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 (cherry picked from commit 25eb99d309ac2d13ac4e7dccf973250ca844c781) Conflicts: src/client/Client.cc: path_walk refactor conflict --- src/client/Client.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/client/Client.cc b/src/client/Client.cc index 1ce6aa20260..207c4086189 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -12587,9 +12587,7 @@ int Client::ll_walk(const char* name, Inode **out, struct ceph_statx *stx, if (!mref_reader.is_state_satisfied()) return -CEPHFS_ENOTCONN; - filepath fp(name, 0); InodeRef in; - int rc; unsigned mask = statx_to_mask(flags, want); ldout(cct, 3) << __func__ << " " << name << dendl; @@ -12597,7 +12595,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(fp, &in, perms, !(flags & AT_SYMLINK_NOFOLLOW), mask); + int rc = path_walk(filepath(name), &in, perms, !(flags & AT_SYMLINK_NOFOLLOW), mask); if (rc < 0) { /* zero out mask, just in case... */ stx->stx_mask = 0; -- 2.39.5