rgw: modify ret cond in middle of CreateBucket::Execute()

Return prevents swift metadata from being removed
if bucket already exists.

Signed-off-by: Ali Maredia <amaredia@redhat.com>
This commit is contained in:
Ali Maredia 2023-09-20 04:12:15 +00:00 committed by Casey Bodley
parent 72065c9c71
commit 0540cc65ef

View File

@ -3592,7 +3592,7 @@ void RGWCreateBucket::execute(optional_yield y)
* recover from a partial create by retrying it. */
ldpp_dout(this, 20) << "Bucket::create() returned ret=" << op_ret << " bucket=" << s->bucket << dendl;
if (op_ret)
if (op_ret < 0 && op_ret != EEXIST && op_ret != ERR_BUCKET_EXISTS)
return;
const bool existed = s->bucket_exists;