From: Yan Jun Date: Thu, 30 Jun 2016 02:49:41 +0000 (+0800) Subject: rgw: fix the missing return value X-Git-Tag: ses5-milestone5~550^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c41ff0eb8c1135cb555a54af32bbb72134f2fdff;p=ceph.git rgw: fix the missing return value If `get_bucket_index_object` returns an error code (-ENOTSUP) with ivalid `hash_type`, we should return this negative error code that resulting in `BucketShard::init` failed as expected, oherwise it will go wrong. Signed-off-by: Yan Jun --- diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 1c28becdbf93..a7186239277f 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -7485,6 +7485,7 @@ int RGWRados::open_bucket_index_shard(rgw_bucket& bucket, librados::IoCtx& index (RGWBucketInfo::BIShardsHashType)binfo.bucket_index_shard_hash_type, bucket_obj, shard_id); if (ret < 0) { ldout(cct, 10) << "get_bucket_index_object() returned ret=" << ret << dendl; + return ret; } return 0; }