Skip to content

Commit 0de4292

Browse files
committed
rgw/rest: removed unused 'objv' from RGWRESTConn::forward()
all callers of forward() and forward_iam_request() were passing null Signed-off-by: Casey Bodley <[email protected]>
1 parent ebb2f72 commit 0de4292

File tree

6 files changed

+8
-20
lines changed

6 files changed

+8
-20
lines changed

src/rgw/radosgw-admin/radosgw-admin.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1902,7 +1902,7 @@ static int send_to_remote_gateway(RGWRESTConn* conn, req_info& info,
19021902

19031903
ceph::bufferlist response;
19041904
rgw_user user;
1905-
int ret = conn->forward(dpp(), user, info, nullptr, MAX_REST_RESPONSE, &in_data, &response, null_yield);
1905+
int ret = conn->forward(dpp(), user, info, MAX_REST_RESPONSE, &in_data, &response, null_yield);
19061906

19071907
int parse_ret = parser.parse(response.c_str(), response.length());
19081908
if (parse_ret < 0) {

src/rgw/rgw_op.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ int rgw_forward_request_to_master(const DoutPrefixProvider* dpp,
155155
creds, site.get_zonegroup().id, zg->second.api_name};
156156
bufferlist outdata;
157157
constexpr size_t max_response_size = 128 * 1024; // we expect a very small response
158-
int ret = conn.forward(dpp, effective_owner, req, nullptr,
158+
int ret = conn.forward(dpp, effective_owner, req,
159159
max_response_size, indata, &outdata, y);
160160
if (ret < 0) {
161161
return ret;

src/rgw/rgw_period_puller.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ int pull_period(const DoutPrefixProvider *dpp, RGWRESTConn* conn, const std::str
4040

4141
bufferlist data;
4242
#define MAX_REST_RESPONSE (128 * 1024)
43-
int r = conn->forward(dpp, user, info, nullptr, MAX_REST_RESPONSE, nullptr, &data, y);
43+
int r = conn->forward(dpp, user, info, MAX_REST_RESPONSE, nullptr, &data, y);
4444
if (r < 0) {
4545
return r;
4646
}

src/rgw/rgw_rest_conn.cc

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ void RGWRESTConn::populate_params(param_vec_t& params, const rgw_owner* uid, con
153153
populate_zonegroup(params, zonegroup);
154154
}
155155

156-
int RGWRESTConn::forward(const DoutPrefixProvider *dpp, const rgw_owner& uid, const req_info& info, obj_version *objv, size_t max_response, bufferlist *inbl, bufferlist *outbl, optional_yield y)
156+
int RGWRESTConn::forward(const DoutPrefixProvider *dpp, const rgw_owner& uid, const req_info& info, size_t max_response, bufferlist *inbl, bufferlist *outbl, optional_yield y)
157157
{
158158
int ret = 0;
159159

@@ -165,12 +165,6 @@ int RGWRESTConn::forward(const DoutPrefixProvider *dpp, const rgw_owner& uid, co
165165
return ret;
166166
param_vec_t params;
167167
populate_params(params, &uid, self_zone_group);
168-
if (objv) {
169-
params.push_back(param_pair_t(RGW_SYS_PARAM_PREFIX "tag", objv->tag));
170-
char buf[16];
171-
snprintf(buf, sizeof(buf), "%lld", (long long)objv->ver);
172-
params.push_back(param_pair_t(RGW_SYS_PARAM_PREFIX "ver", buf));
173-
}
174168
RGWRESTSimpleRequest req(cct, info.method, url, NULL, &params, api_name);
175169
ret = req.forward_request(dpp, key, info, max_response, inbl, outbl, y);
176170
if (ret == -EIO) {
@@ -185,7 +179,7 @@ int RGWRESTConn::forward(const DoutPrefixProvider *dpp, const rgw_owner& uid, co
185179
return ret;
186180
}
187181

188-
int RGWRESTConn::forward_iam_request(const DoutPrefixProvider *dpp, const req_info& info, obj_version *objv, size_t max_response, bufferlist *inbl, bufferlist *outbl, optional_yield y)
182+
int RGWRESTConn::forward_iam_request(const DoutPrefixProvider *dpp, const req_info& info, size_t max_response, bufferlist *inbl, bufferlist *outbl, optional_yield y)
189183
{
190184
int ret = 0;
191185

@@ -196,12 +190,6 @@ int RGWRESTConn::forward_iam_request(const DoutPrefixProvider *dpp, const req_in
196190
if (ret < 0)
197191
return ret;
198192
param_vec_t params;
199-
if (objv) {
200-
params.push_back(param_pair_t(RGW_SYS_PARAM_PREFIX "tag", objv->tag));
201-
char buf[16];
202-
snprintf(buf, sizeof(buf), "%lld", (long long)objv->ver);
203-
params.push_back(param_pair_t(RGW_SYS_PARAM_PREFIX "ver", buf));
204-
}
205193
std::string service = "iam";
206194
RGWRESTSimpleRequest req(cct, info.method, url, NULL, &params, api_name);
207195
// coverity[uninit_use_in_call:SUPPRESS]

src/rgw/rgw_rest_conn.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,10 @@ class RGWRESTConn
130130
virtual void populate_params(param_vec_t& params, const rgw_owner* uid, const std::string& zonegroup);
131131

132132
/* sync request */
133-
int forward(const DoutPrefixProvider *dpp, const rgw_owner& uid, const req_info& info, obj_version *objv, size_t max_response, bufferlist *inbl, bufferlist *outbl, optional_yield y);
133+
int forward(const DoutPrefixProvider *dpp, const rgw_owner& uid, const req_info& info, size_t max_response, bufferlist *inbl, bufferlist *outbl, optional_yield y);
134134

135135
/* sync request */
136-
int forward_iam_request(const DoutPrefixProvider *dpp, const req_info& info, obj_version *objv, size_t max_response, bufferlist *inbl, bufferlist *outbl, optional_yield y);
136+
int forward_iam_request(const DoutPrefixProvider *dpp, const req_info& info, size_t max_response, bufferlist *inbl, bufferlist *outbl, optional_yield y);
137137

138138

139139
/* async requests */

src/rgw/rgw_rest_iam.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ int forward_iam_request_to_master(const DoutPrefixProvider* dpp,
304304
std::move(creds), zg->second.id, zg->second.api_name};
305305
bufferlist outdata;
306306
constexpr size_t max_response_size = 128 * 1024; // we expect a very small response
307-
int ret = conn.forward_iam_request(dpp, req, nullptr, max_response_size,
307+
int ret = conn.forward_iam_request(dpp, req, max_response_size,
308308
&indata, &outdata, y);
309309
if (ret < 0) {
310310
return ret;

0 commit comments

Comments
 (0)