]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/posix: Fix return value for open call on versioned dir 66800/head
authorSamarah Uriarte <samarah.uriarte@ibm.com>
Mon, 5 Jan 2026 22:14:36 +0000 (16:14 -0600)
committerSamarah Uriarte <samarah.uriarte@ibm.com>
Mon, 12 Jan 2026 15:49:44 +0000 (09:49 -0600)
Signed-off-by: Samarah Uriarte <samarah.uriarte@ibm.com>
src/rgw/driver/posix/rgw_sal_posix.cc

index d762b5768de23016d275e2823dd0a66752266f91..50df5fb2904efb78eb11e89940b685074b132857 100644 (file)
@@ -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<VersionedDirectory>(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()) {