diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index 3b7a0e41666..e1b5b6f22da 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -4933,16 +4933,7 @@ void RGWPutLC::execute() void RGWDeleteLC::execute() { - bufferlist bl; - map attrs; - map::iterator iter; - rgw_raw_obj obj; - store->get_bucket_instance_obj(s->bucket, obj); - store->set_prefetch_data(s->obj_ctx, obj); - op_ret = get_system_obj_attrs(store, s, obj, attrs, NULL, &s->bucket_info.objv_tracker); - if (op_ret < 0) - return; - + map attrs = s->bucket_attrs; attrs.erase(RGW_ATTR_LC); op_ret = rgw_bucket_set_attrs(store, s->bucket_info, attrs, &s->bucket_info.objv_tracker); @@ -5040,21 +5031,13 @@ void RGWDeleteCORS::execute() if (op_ret < 0) return op_ret; - rgw_raw_obj obj; if (!cors_exist) { dout(2) << "No CORS configuration set yet for this bucket" << dendl; op_ret = -ENOENT; return op_ret; } - store->get_bucket_instance_obj(s->bucket, obj); - store->set_prefetch_data(s->obj_ctx, obj); - map attrs; - map::iterator iter; - - op_ret = get_system_obj_attrs(store, s, obj, attrs, NULL, &s->bucket_info.objv_tracker); - if (op_ret < 0) - return op_ret; + map attrs = s->bucket_attrs; attrs.erase(RGW_ATTR_CORS); op_ret = rgw_bucket_set_attrs(store, s->bucket_info, attrs, &s->bucket_info.objv_tracker);