From 6e07b7eeb4ed23aff31a4bc40ca8b54bf691b7b2 Mon Sep 17 00:00:00 2001 From: Jane Zhu Date: Wed, 1 Nov 2023 12:32:52 -0400 Subject: [PATCH] rgw: fix the ret cond check CreateBucket::Execute() Signed-off-by: Juan Zhu (cherry picked from commit a4553f035124b53ebd77d3d01911fe523d7df881) --- src/rgw/rgw_op.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index 9791ccc50bfbb..27da62f2195ec 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -3305,7 +3305,7 @@ void RGWCreateBucket::execute(optional_yield y) * recover from a partial create by retrying it. */ ldpp_dout(this, 20) << "rgw_create_bucket returned ret=" << op_ret << " bucket=" << s->bucket.get() << dendl; - if (op_ret < 0 && op_ret != EEXIST && op_ret != ERR_BUCKET_EXISTS) + if (op_ret < 0 && op_ret != -EEXIST && op_ret != -ERR_BUCKET_EXISTS) return; const bool existed = s->bucket_exists; -- 2.39.5