]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: init_quota() loads owner quota unconditionally
authorCasey Bodley <cbodley@redhat.com>
Wed, 20 Dec 2023 21:10:12 +0000 (16:10 -0500)
committerCasey Bodley <cbodley@redhat.com>
Wed, 10 Apr 2024 17:09:14 +0000 (13:09 -0400)
now that owners can be accounts, don't default to s->user when s->owner
matches s->bucket_owner

Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_op.cc

index 6dbac832d914670c97442ba84ceee785fbd99e68..f261209fee6254aad16fbd32d740ace5151fbcf6 100644 (file)
@@ -1472,15 +1472,11 @@ int RGWOp::init_quota()
 
   RGWQuota user_quotas;
 
-  if (s->owner.id == s->bucket_owner.id) {
-    user_quotas = s->user->get_info().quota;
-  } else {
-    // consult the bucket owner's quota
-    int r = get_owner_quota_info(this, s->yield, driver,
-                                 s->bucket_owner.id, user_quotas);
-    if (r < 0) {
-      return r;
-    }
+  // consult the bucket owner's quota
+  int r = get_owner_quota_info(this, s->yield, driver,
+                               s->bucket_owner.id, user_quotas);
+  if (r < 0) {
+    return r;
   }
 
   driver->get_quota(quota);