From: Matt Benjamin Date: Fri, 13 Feb 2026 20:29:58 +0000 (-0500) Subject: posixdriver: can move buffer::list leaving scope X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d7ae6fb427da90910784dc81cde664810ad5e9de;p=ceph.git posixdriver: can move buffer::list leaving scope Signed-off-by: Matt Benjamin --- diff --git a/src/rgw/driver/posix/rgw_sal_posix.cc b/src/rgw/driver/posix/rgw_sal_posix.cc index 461beef0335..fa135b82b2e 100644 --- a/src/rgw/driver/posix/rgw_sal_posix.cc +++ b/src/rgw/driver/posix/rgw_sal_posix.cc @@ -4062,15 +4062,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