From: J. Eric Ivancich Date: Fri, 16 Nov 2018 15:47:48 +0000 (-0500) Subject: rgw: fix bug in error codes returned X-Git-Tag: v14.1.0~701^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=dc0732c524c2d8fb5b423f8cce8c6cc9aa7ca44a;p=ceph.git rgw: fix bug in error codes returned Fixes two bugs where positive error code was returned rather than negative error code, which is the RGW norm. Signed-off-by: J. Eric Ivancich --- diff --git a/src/rgw/rgw_reshard.cc b/src/rgw/rgw_reshard.cc index 955ee536d3c2..7995d5b3e132 100644 --- a/src/rgw/rgw_reshard.cc +++ b/src/rgw/rgw_reshard.cc @@ -307,13 +307,13 @@ static int create_new_bucket_instance(RGWRados *store, int ret = store->init_bucket_index(new_bucket_info, new_bucket_info.num_shards); if (ret < 0) { cerr << "ERROR: failed to init new bucket indexes: " << cpp_strerror(-ret) << std::endl; - return -ret; + return ret; } ret = store->put_bucket_instance_info(new_bucket_info, true, real_time(), &attrs); if (ret < 0) { cerr << "ERROR: failed to store new bucket instance info: " << cpp_strerror(-ret) << std::endl; - return -ret; + return ret; } return 0;