From: Casey Bodley Date: Tue, 31 Mar 2020 13:23:25 +0000 (-0400) Subject: rgw: ContinuousLeaseCR doesn't need locks/atomics X-Git-Tag: v16.1.0~2586^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2075addc658b2a4eb85e3bf1bc78ae817a95c889;p=ceph.git rgw: ContinuousLeaseCR doesn't need locks/atomics Signed-off-by: Casey Bodley --- diff --git a/src/rgw/rgw_cr_rados.h b/src/rgw/rgw_cr_rados.h index 82bf8e5d13cc..1afba29f6bc7 100644 --- a/src/rgw/rgw_cr_rados.h +++ b/src/rgw/rgw_cr_rados.h @@ -1262,9 +1262,7 @@ class RGWContinuousLeaseCR : public RGWCoroutine { const string cookie; int interval; - - ceph::mutex lock = ceph::make_mutex("RGWContinuousLeaseCR"); - std::atomic 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; }