From: Samarah Uriarte Date: Mon, 5 Jan 2026 22:14:36 +0000 (-0600) Subject: rgw/posix: Fix return value for open call on versioned dir X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F66800%2Fhead;p=ceph.git rgw/posix: Fix return value for open call on versioned dir Signed-off-by: Samarah Uriarte --- diff --git a/src/rgw/driver/posix/rgw_sal_posix.cc b/src/rgw/driver/posix/rgw_sal_posix.cc index d762b5768de23..50df5fb2904ef 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()) {