From: Yehuda Sadeh Date: Mon, 27 Feb 2017 18:35:01 +0000 (-0800) Subject: rgw: don't init rgw_obj from rgw_obj_key when it's incorrect to do so X-Git-Tag: v12.0.1~242^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=392c5d9dae6ba699014ffe6e1e67818fa62d7e41;p=ceph.git rgw: don't init rgw_obj from rgw_obj_key when it's incorrect to do so Fixes: http://tracker.ceph.com/issues/19096 rgw_obj_key currently deals with the bucket index key, and not representing a (name, instance, ns) tupple. Need to initialize it in two steps. Signed-off-by: Yehuda Sadeh --- diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index 29a272184eb..de37ea734d9 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -508,7 +508,8 @@ int rgw_build_object_policies(RGWRados *store, struct req_state *s, } s->object_acl = new RGWAccessControlPolicy(s->cct); - rgw_obj obj(s->bucket, s->object); + rgw_obj obj(s->bucket, s->object.name); + obj.set_instance(s->object.instance); store->set_atomic(s->obj_ctx, obj); if (prefetch_data) { @@ -5500,7 +5501,8 @@ void RGWSetAttrs::execute() if (op_ret < 0) return; - rgw_obj obj(s->bucket, s->object); + rgw_obj obj(s->bucket, s->object.name); + obj.set_instance(s->object.instance); store->set_atomic(s->obj_ctx, obj);