From: Casey Bodley Date: Tue, 26 Jul 2022 19:09:42 +0000 (-0400) Subject: rgw: RGWCreateBucket cleanup X-Git-Tag: v19.0.0~122^2~16 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=de364986ffc83b409c309413713ffa25e2407cbf;p=ceph.git rgw: RGWCreateBucket cleanup Signed-off-by: Casey Bodley --- diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index fec40c250735..0307658aa0a6 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -3328,10 +3328,6 @@ static void filter_out_website(std::map& add_attr void RGWCreateBucket::execute(optional_yield y) { - buffer::list aclbl; - buffer::list corsbl; - string bucket_name = rgw_make_bucket_entry_name(s->bucket_tenant, s->bucket_name); - op_ret = get_params(y); if (op_ret < 0) return; @@ -3418,10 +3414,12 @@ void RGWCreateBucket::execute(optional_yield y) /* Encode special metadata first as we're using std::map::emplace under * the hood. This method will add the new items only if the map doesn't * contain such keys yet. */ + buffer::list aclbl; policy.encode(aclbl); emplace_attr(RGW_ATTR_ACL, std::move(aclbl)); if (has_cors) { + buffer::list corsbl; cors_config.encode(corsbl); emplace_attr(RGW_ATTR_CORS, std::move(corsbl)); } @@ -3441,9 +3439,8 @@ void RGWCreateBucket::execute(optional_yield y) op_ret = filter_out_quota_info(attrs, rmattr_names, quota_info); if (op_ret < 0) { return; - } else { - pquota_info = "a_info; } + pquota_info = "a_info; /* Web site of Swift API. */ filter_out_website(attrs, rmattr_names, info.website_conf);