From b8032ba723968d9aef8e759b67ca7d7dde1e6f9e Mon Sep 17 00:00:00 2001 From: Samarah Uriarte Date: Mon, 5 Jan 2026 16:14:36 -0600 Subject: [PATCH] rgw/posix: Fix return value for open call on versioned dir Signed-off-by: Samarah Uriarte --- src/rgw/driver/posix/rgw_sal_posix.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rgw/driver/posix/rgw_sal_posix.cc b/src/rgw/driver/posix/rgw_sal_posix.cc index d762b5768de..50df5fb2904 100644 --- a/src/rgw/driver/posix/rgw_sal_posix.cc +++ b/src/rgw/driver/posix/rgw_sal_posix.cc @@ -1055,6 +1055,7 @@ int Directory::get_ent(const DoutPrefixProvider *dpp, optional_yield y, const st decode_attr(attrs, RGW_POSIX_ATTR_OBJECT_TYPE, type); } } + ::close(tmpfd); switch (type.type) { case ObjectType::VERSIONED: nent = std::make_unique(name, this, instance, nstx, ctx); @@ -1399,7 +1400,7 @@ int VersionedDirectory::open(const DoutPrefixProvider* dpp) } int ret = Directory::open(dpp); if (ret < 0) { - return 0; + return ret; } if (!instance_id.empty()) { -- 2.47.3