]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: rgw_link_bucket, use correct bucket structure for entry point
authorYehuda Sadeh <yehuda@redhat.com>
Sat, 24 Sep 2016 17:33:57 +0000 (10:33 -0700)
committerYehuda Sadeh <yehuda@redhat.com>
Wed, 19 Oct 2016 15:41:47 +0000 (08:41 -0700)
The bucket structure might be different than the one that we were using
before.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/rgw_bucket.cc

index b49c7477457b603696feb00f085291ee1d9d47e9..199dc1a4041fd46477d189b58abe2241bacc739b 100644 (file)
@@ -224,6 +224,7 @@ int rgw_link_bucket(RGWRados *store, const rgw_user& user_id, rgw_bucket& bucket
 
   ep.linked = true;
   ep.owner = user_id;
+  ep.bucket = bucket;
   ret = store->put_bucket_entrypoint_info(tenant_name, bucket_name, ep, false, ot, real_time(), &attrs);
   if (ret < 0)
     goto done_err;
@@ -891,7 +892,7 @@ int RGWBucket::link(RGWBucketAdminOpState& op_state, std::string *err_msg)
     rgw_obj obj_bucket_instance(bucket_instance, no_oid);
     r = store->system_obj_set_attr(NULL, obj_bucket_instance, RGW_ATTR_ACL, aclbl, &objv_tracker);
 
-    r = rgw_link_bucket(store, user_info.user_id, bucket, real_time());
+    r = rgw_link_bucket(store, user_info.user_id, bucket_info.bucket, real_time());
     if (r < 0)
       return r;
   }