]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
posixdriver: can move buffer::list leaving scope
authorMatt Benjamin <mbenjamin@redhat.com>
Fri, 13 Feb 2026 20:29:58 +0000 (15:29 -0500)
committerDaniel Gryniewicz <dang@fprintf.net>
Fri, 29 May 2026 16:05:12 +0000 (12:05 -0400)
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
src/rgw/driver/posix/rgw_sal_posix.cc

index 69fc8362c25313f1c4fed0cb36d93c5372fd7142..4888fd30d34170f464577f91c1f6349740254484 100644 (file)
@@ -4072,15 +4072,17 @@ int POSIXMultipartUpload::complete(const DoutPrefixProvider *dpp,
     attrs[RGW_ATTR_COMPRESSION] = tmp;
   }
 
-  POSIXManifest manifest;
-  manifest.multipart_part_count = total_parts;
-  buffer::list manifest_bl;
-  manifest.encode(manifest_bl);
-  attrs[RGW_POSIX_ATTR_MANIFEST] = manifest_bl;
+  {
+    POSIXManifest manifest;
+    manifest.multipart_part_count = total_parts;
+    buffer::list manifest_bl;
+    manifest.encode(manifest_bl);
+    attrs[RGW_POSIX_ATTR_MANIFEST] = std::move(manifest_bl);
 
-  ret = shadow->merge_and_store_attrs(dpp, attrs, y);
-  if (ret < 0) {
-    return ret;
+    ret = shadow->merge_and_store_attrs(dpp, attrs, y);
+    if (ret < 0) {
+      return ret;
+    }
   }
 
   // Rename to target_obj