]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tools/cephfs_mirror: fix lock declaratie/locking 42960/head
authorWillem Jan Withagen <wjw@digiware.nl>
Sat, 28 Aug 2021 15:40:11 +0000 (17:40 +0200)
committerWillem Jan Withagen <wjw@digiware.nl>
Sat, 28 Aug 2021 15:40:29 +0000 (17:40 +0200)
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 <wjw@digiware.nl>
src/tools/cephfs_mirror/ClusterWatcher.cc

index 40aab756ee97fa1c68e7f1dc77b79217642771d5..b5f6f81d7f772eabae3297e8108e6cf869d532cc 100644 (file)
@@ -172,7 +172,7 @@ void ClusterWatcher::handle_fsmap(const cref_t<MFSMap> &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()