]> git.apps.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>
Fri, 30 Sep 2016 17:16:37 +0000 (10:16 -0700)
The bucket structure might be different than the one that we were using
before.

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

src/rgw/rgw_bucket.cc

index 6384c7fa3b99db5411feaac2da7138d9b40f99a3..50627948d9eb1f32ba2d3216ff69285d0c2c379f 100644 (file)
@@ -158,6 +158,7 @@ int rgw_link_bucket(RGWRados *store, string user_id, rgw_bucket& bucket, time_t
 
   ep.linked = true;
   ep.owner = user_id;
+  ep.bucket = bucket;
   ret = store->put_bucket_entrypoint_info(bucket_name, ep, false, ot, 0, &attrs);
   if (ret < 0)
     goto done_err;
@@ -746,7 +747,7 @@ int RGWBucket::link(RGWBucketAdminOpState& op_state, std::string *err_msg)
     rgw_obj obj_bucket_instance(bucket_instance, no_oid);
     r = store->set_attr(NULL, obj_bucket_instance, RGW_ATTR_ACL, aclbl, &objv_tracker);
 
-    r = rgw_link_bucket(store, user_info.user_id, bucket, 0);
+    r = rgw_link_bucket(store, user_info.user_id, bucket_info.bucket, 0);
     if (r < 0)
       return r;
   }