From: Kefu Chai Date: Sun, 26 Jan 2020 16:19:01 +0000 (+0800) Subject: rgw: set bucket quota only when necessary X-Git-Tag: v15.1.0~44^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d1f8717988dafbdff77c73a1359fec6ebb42c789;p=ceph.git rgw: set bucket quota only when necessary this change fixes the regression introduced by 9a7f76a7 Signed-off-by: Kefu Chai --- diff --git a/src/rgw/rgw_rest_user.cc b/src/rgw/rgw_rest_user.cc index c22543553e48..89a339468b9f 100644 --- a/src/rgw/rgw_rest_user.cc +++ b/src/rgw/rgw_rest_user.cc @@ -182,12 +182,12 @@ void RGWOp_User_Create::execute() op_state.set_key_type(key_type); } - if (max_buckets != default_max_buckets) + if (max_buckets != default_max_buckets) { if (max_buckets < 0) { max_buckets = -1; } op_state.set_max_buckets(max_buckets); - + } if (s->info.args.exists("suspended")) op_state.set_suspension(suspended); @@ -277,12 +277,12 @@ void RGWOp_User_Modify::execute() op_state.set_access_key(access_key); op_state.set_secret_key(secret_key); - if (quota_set) + if (quota_set) { if (max_buckets < 0 ) { max_buckets = -1; } op_state.set_max_buckets(max_buckets); - + } if (gen_key) op_state.set_generate_key();