From: Willem Jan Withagen Date: Sat, 28 Aug 2021 15:40:11 +0000 (+0200) Subject: tools/cephfs_mirror: fix lock declaratie/locking X-Git-Tag: v16.2.7~99^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F43198%2Fhead;p=ceph.git tools/cephfs_mirror: fix lock declaratie/locking Clang complains: ``` /home/jenkins/workspace/ceph-master-compile/src/tools/cephfs_mirror/ClusterWatcher.cc:175:19: error: cannot use parentheses when declaring variable with deduced class template specialization type std::scoped_lock(m_lock); ^ ``` fixes: https://github.com/ceph/ceph/pull/42751 Signed-off-by: Willem Jan Withagen (cherry picked from commit 3f952b9c9b69a361441952b279a39b164881ce12) --- diff --git a/src/tools/cephfs_mirror/ClusterWatcher.cc b/src/tools/cephfs_mirror/ClusterWatcher.cc index 40aab756ee97..b5f6f81d7f77 100644 --- a/src/tools/cephfs_mirror/ClusterWatcher.cc +++ b/src/tools/cephfs_mirror/ClusterWatcher.cc @@ -172,7 +172,7 @@ void ClusterWatcher::handle_fsmap(const cref_t &m) { } } - std::scoped_lock(m_lock); + std::scoped_lock locker(m_lock); if (!m_stopping) { m_monc->sub_got("fsmap", fsmap.get_epoch()); } // else we have already done a sub_unwant()