]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw: fix the missing return value
authorYan Jun <yan.jun8@zte.com.cn>
Thu, 30 Jun 2016 02:49:41 +0000 (10:49 +0800)
committerYan Jun <yan.jun8@zte.com.cn>
Thu, 30 Jun 2016 02:49:41 +0000 (10:49 +0800)
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 <yan.jun8@zte.com.cn>
src/rgw/rgw_rados.cc

index 1c28becdbf9383c6f17d4ffe1876b2e56f62aa4d..a7186239277f23d6fa0e8329a59fbd0d63f780c0 100644 (file)
@@ -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;
 }