From 47cf8f6699ec0690e2a296b3abe289ce5d212e1c Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Mon, 27 Feb 2017 10:35:01 -0800 Subject: [PATCH] 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 (cherry picked from commit 392c5d9dae6ba699014ffe6e1e67818fa62d7e41) --- src/rgw/rgw_op.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index 5eaf0e9981d..5a30e1327d8 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -507,7 +507,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) { @@ -5499,7 +5500,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); -- 2.47.3