From c41ff0eb8c1135cb555a54af32bbb72134f2fdff Mon Sep 17 00:00:00 2001 From: Yan Jun Date: Thu, 30 Jun 2016 10:49:41 +0800 Subject: [PATCH] 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 --- src/rgw/rgw_rados.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 1c28becdbf938..a7186239277f2 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; } -- 2.39.5