From: Casey Bodley Date: Wed, 15 Apr 2020 13:21:11 +0000 (-0400) Subject: rgw: fix json decode of bucket layout X-Git-Tag: v16.1.0~2522^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8d7077ccad3d0f7f8088d034e977029fc28932e3;p=ceph.git rgw: fix json decode of bucket layout Signed-off-by: Casey Bodley --- diff --git a/src/rgw/rgw_json_enc.cc b/src/rgw/rgw_json_enc.cc index 8083212e33b5..230bdc73caef 100644 --- a/src/rgw/rgw_json_enc.cc +++ b/src/rgw/rgw_json_enc.cc @@ -818,7 +818,7 @@ void RGWBucketInfo::decode_json(JSONObj *obj) { JSONDecoder::decode_json("num_shards", layout.current_index.layout.normal.num_shards, obj); uint32_t hash_type; JSONDecoder::decode_json("bi_shard_hash_type", hash_type, obj); - layout.current_index.layout.normal.num_shards = (uint8_t)hash_type; + layout.current_index.layout.normal.hash_type = static_cast(hash_type); JSONDecoder::decode_json("requester_pays", requester_pays, obj); JSONDecoder::decode_json("has_website", has_website, obj); if (has_website) {