From: Ilya Dryomov Date: Mon, 18 Feb 2019 10:55:55 +0000 (+0100) Subject: librbd: CopyupRequest::m_pending_copyups doesn't need to be atomic X-Git-Tag: v14.1.0~34^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F26483%2Fhead;p=ceph.git librbd: CopyupRequest::m_pending_copyups doesn't need to be atomic It's protected by CopyupRequest::m_lock mutex. Signed-off-by: Ilya Dryomov --- diff --git a/src/librbd/io/CopyupRequest.cc b/src/librbd/io/CopyupRequest.cc index dddaa369fc8c1..334f0ec41623f 100644 --- a/src/librbd/io/CopyupRequest.cc +++ b/src/librbd/io/CopyupRequest.cc @@ -282,7 +282,7 @@ bool CopyupRequest::should_complete(int *r) { ldout(cct, 20) << "oid " << m_oid << ", r " << *r << dendl; - uint64_t pending_copyups; + unsigned pending_copyups; switch (m_state) { case STATE_READ_FROM_PARENT: ldout(cct, 20) << "READ_FROM_PARENT" << dendl; diff --git a/src/librbd/io/CopyupRequest.h b/src/librbd/io/CopyupRequest.h index fba71202372de..d091e8775293b 100644 --- a/src/librbd/io/CopyupRequest.h +++ b/src/librbd/io/CopyupRequest.h @@ -95,7 +95,7 @@ private: bool m_flatten; ceph::bufferlist m_copyup_data; std::vector *> m_pending_requests; - std::atomic m_pending_copyups { 0 }; + unsigned m_pending_copyups = 0; AsyncOperation m_async_op;