]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw: http client doesn't need lock to access atomic 'done'
authorCasey Bodley <cbodley@redhat.com>
Thu, 8 Aug 2019 14:04:12 +0000 (10:04 -0400)
committerCasey Bodley <cbodley@redhat.com>
Thu, 8 Aug 2019 14:04:14 +0000 (10:04 -0400)
Reported-by: Yuval Lifshitz <yuvalif@yahoo.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_http_client.cc

index 01b36f0ca8799d222e6e1a44962916a91a4c36e8..7c0c77e341cc4d3dc570eedbb57edae1a7be51bb 100644 (file)
@@ -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);
   }
 }