From 213bc895cd05afc655d8d04c02040d270f057b5c Mon Sep 17 00:00:00 2001 From: Shinobu Kinjo Date: Thu, 4 Jan 2018 10:38:23 +0900 Subject: [PATCH] common: Do not use unique_lock, if manual lock/unlock are not necessary Signed-off-by: Shinobu Kinjo --- src/common/mempool.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/mempool.cc b/src/common/mempool.cc index 02ed3c6558e97..a05d72a4b3045 100644 --- a/src/common/mempool.cc +++ b/src/common/mempool.cc @@ -100,7 +100,7 @@ void mempool::pool_t::get_stats( total->bytes += shard[i].bytes; } if (debug_mode) { - std::unique_lock shard_lock(lock); + std::lock_guard shard_lock(lock); for (auto &p : type_map) { std::string n = ceph_demangle(p.second.type_name); stats_t &s = (*by_type)[n]; -- 2.39.5