From: Yehuda Sadeh Date: Tue, 30 Jul 2013 20:53:53 +0000 (-0700) Subject: rgw: fix set_buckets_enabled(), set_bucket_owner() X-Git-Tag: v0.67~43 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=736d6a1bde71919f7469218684c12793a9532aeb;p=ceph.git rgw: fix set_buckets_enabled(), set_bucket_owner() Fixes: 5808 We cannot call get_bucket_instance_info() at that point, as the bucket structure wasn't initialized, so we don't have the bucket instance location information. Just calling get_bucket_info(). Signed-off-by: Yehuda Sadeh Reviewed-by: Greg Farnum --- diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 7131df9eaebb2..aba5cdf0ee273 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -2907,7 +2907,7 @@ int RGWRados::set_bucket_owner(rgw_bucket& bucket, ACLOwner& owner) { RGWBucketInfo info; map attrs; - int r = get_bucket_instance_info(NULL, bucket, info, NULL, &attrs); + int r = get_bucket_info(NULL, bucket.name, info, NULL, &attrs); if (r < 0) { ldout(cct, 0) << "NOTICE: get_bucket_info on bucket=" << bucket.name << " returned err=" << r << dendl; return r; @@ -2940,7 +2940,7 @@ int RGWRados::set_buckets_enabled(vector& buckets, bool enabled) RGWBucketInfo info; map attrs; - int r = get_bucket_instance_info(NULL, bucket, info, NULL, &attrs); + int r = get_bucket_info(NULL, bucket.name, info, NULL, &attrs); if (r < 0) { ldout(cct, 0) << "NOTICE: get_bucket_info on bucket=" << bucket.name << " returned err=" << r << ", skipping bucket" << dendl; ret = r;