]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
kv: Mutex::Locker -> std::lock_guard
authorSage Weil <sage@redhat.com>
Tue, 16 Oct 2018 19:11:21 +0000 (14:11 -0500)
committerSage Weil <sage@redhat.com>
Tue, 16 Oct 2018 19:11:21 +0000 (14:11 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/kv/LevelDBStore.cc
src/kv/RocksDBStore.cc

index bdd76e431835307f3cdafc907efa14e2a274afd5..d75b3a6606825f85082a8e0396eb61030e3e573b 100644 (file)
@@ -409,7 +409,7 @@ void LevelDBStore::compact_thread_entry()
 
 void LevelDBStore::compact_range_async(const string& start, const string& end)
 {
-  Mutex::Locker l(compact_queue_lock);
+  std::lock_guard l(compact_queue_lock);
 
   // try to merge adjacent ranges.  this is O(n), but the queue should
   // be short.  note that we do not cover all overlap cases and merge
index f484fb20c5f1f2d4c62c999e7120c06a769784ee..2f47cb5358f80def84e3b5dccc6d7dd82b32df8e 100644 (file)
@@ -1213,7 +1213,7 @@ void RocksDBStore::compact_thread_entry()
 
 void RocksDBStore::compact_range_async(const string& start, const string& end)
 {
-  Mutex::Locker l(compact_queue_lock);
+  std::lock_guard l(compact_queue_lock);
 
   // try to merge adjacent ranges.  this is O(n), but the queue should
   // be short.  note that we do not cover all overlap cases and merge