From fef63ad340985245fc8fc2fcb0777105b49077a6 Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Thu, 8 Aug 2019 10:04:12 -0400 Subject: [PATCH] rgw: http client doesn't need lock to access atomic 'done' Reported-by: Yuval Lifshitz Signed-off-by: Casey Bodley --- src/rgw/rgw_http_client.cc | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/rgw/rgw_http_client.cc b/src/rgw/rgw_http_client.cc index 01b36f0ca87..7c0c77e341c 100644 --- a/src/rgw/rgw_http_client.cc +++ b/src/rgw/rgw_http_client.cc @@ -108,12 +108,7 @@ struct rgw_http_req_data : public RefCountedObject { } } - bool _is_done() { - return done; - } - bool is_done() { - std::lock_guard l{lock}; return done; } @@ -895,7 +890,7 @@ void RGWHTTPManager::_unlink_request(rgw_http_req_data *req_data) if (req_data->curl_handle) { curl_multi_remove_handle((CURLM *)multi_handle, req_data->get_easy_handle()); } - if (!req_data->_is_done()) { + if (!req_data->is_done()) { _finish_request(req_data, -ECANCELED); } } -- 2.39.5