]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: don't init rgw_obj from rgw_obj_key when it's incorrect to do so 13676/head
authorYehuda Sadeh <yehuda@redhat.com>
Mon, 27 Feb 2017 18:35:01 +0000 (10:35 -0800)
committerYehuda Sadeh <yehuda@redhat.com>
Mon, 27 Feb 2017 18:40:04 +0000 (10:40 -0800)
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 <yehuda@redhat.com>
src/rgw/rgw_op.cc

index 29a272184ebc694038a1f9a86704703cdac0c653..de37ea734d9e74626c15aa7e9186e5bf1f7cebdd 100644 (file)
@@ -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);