]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: ContinuousLeaseCR doesn't need locks/atomics
authorCasey Bodley <cbodley@redhat.com>
Tue, 31 Mar 2020 13:23:25 +0000 (09:23 -0400)
committerCasey Bodley <cbodley@redhat.com>
Mon, 13 Apr 2020 18:08:18 +0000 (14:08 -0400)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_cr_rados.h

index 82bf8e5d13cc51b8f6eac450bcc8792b3273dfbb..1afba29f6bc7bcf9cbe001fe6d3eb744a0520928 100644 (file)
@@ -1262,9 +1262,7 @@ class RGWContinuousLeaseCR : public RGWCoroutine {
   const string cookie;
 
   int interval;
-
-  ceph::mutex lock = ceph::make_mutex("RGWContinuousLeaseCR");
-  std::atomic<bool> going_down = { false };
+  bool going_down{ false };
   bool locked{false};
 
   RGWCoroutine *caller;
@@ -1284,12 +1282,10 @@ public:
   int operate() override;
 
   bool is_locked() {
-    std::lock_guard l{lock};
     return locked;
   }
 
   void set_locked(bool status) {
-    std::lock_guard l{lock};
     locked = status;
   }