From: Patrick Donnelly Date: Thu, 20 Mar 2025 01:25:35 +0000 (-0400) Subject: client: process path without inode anchor X-Git-Tag: v20.3.0~271^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=25eb99d309ac2d13ac4e7dccf973250ca844c781;p=ceph.git 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 --- diff --git a/src/client/Client.cc b/src/client/Client.cc index 4d864873eb110..309456403b39f 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;