diff --git a/src/rgw/rgw_json_enc.cc b/src/rgw/rgw_json_enc.cc index 78dd6f10c87..fb077f9aa8c 100644 --- a/src/rgw/rgw_json_enc.cc +++ b/src/rgw/rgw_json_enc.cc @@ -642,16 +642,9 @@ void RGWRegionMap::dump(Formatter *f) const encode_json("master_region", master_region, f); } -static void decode_regions(map& regions, JSONObj *o) -{ - RGWRegion r; - r.decode_json(o); - regions[r.name] = r; -} - - void RGWRegionMap::decode_json(JSONObj *obj) { - JSONDecoder::decode_json("regions", regions, decode_regions, obj); + JSONDecoder::decode_json("regions", regions, obj); + JSONDecoder::decode_json("master_region", master_region, obj); }