]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: set bucket quota only when necessary 32884/head
authorKefu Chai <kchai@redhat.com>
Sun, 26 Jan 2020 16:19:01 +0000 (00:19 +0800)
committerKefu Chai <kchai@redhat.com>
Sun, 26 Jan 2020 16:23:17 +0000 (00:23 +0800)
this change fixes the regression introduced by 9a7f76a7

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/rgw/rgw_rest_user.cc

index c22543553e4865b301af6321b60e6e157800170f..89a339468b9f8e19df60cea132e68cd4538d045a 100644 (file)
@@ -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();