Merge pull request #44357 from mfatemipour/rgw-bucket-chown-bad-memory-usage

rgw: bucket chown bad memory usage

Reviewed-by: Daniel Gryniewicz <dang@redhat.com>
This commit is contained in:
Casey Bodley 2022-01-31 13:00:04 -05:00 committed by GitHub
commit b23c7720ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2893,7 +2893,6 @@ int RGWBucketCtl::chown(rgw::sal::Store* store, rgw::sal::Bucket* bucket,
const rgw_user& user_id, const std::string& display_name,
const std::string& marker, optional_yield y, const DoutPrefixProvider *dpp)
{
RGWObjectCtx obj_ctx(store);
map<string, bool> common_prefixes;
rgw::sal::Bucket::ListParams params;
@ -2909,6 +2908,7 @@ int RGWBucketCtl::chown(rgw::sal::Store* store, rgw::sal::Bucket* bucket,
//Loop through objects and update object acls to point to bucket owner
do {
RGWObjectCtx obj_ctx(store);
results.objs.clear();
int ret = bucket->list(dpp, params, max_entries, results, y);
if (ret < 0) {