From d4c0d615eb13356512bc31fc89e2819cf03c6cdc Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Wed, 20 Dec 2023 16:10:12 -0500 Subject: [PATCH] rgw: init_quota() loads owner quota unconditionally now that owners can be accounts, don't default to s->user when s->owner matches s->bucket_owner Signed-off-by: Casey Bodley --- src/rgw/rgw_op.cc | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index 6dbac832d9146..f261209fee625 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -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); -- 2.39.5