From: Shinobu Kinjo Date: Thu, 4 Jan 2018 01:38:23 +0000 (+0900) Subject: common: Do not use unique_lock, if manual lock/unlock are not necessary X-Git-Tag: v13.0.2~414^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=213bc895cd05afc655d8d04c02040d270f057b5c;p=ceph.git common: Do not use unique_lock, if manual lock/unlock are not necessary Signed-off-by: Shinobu Kinjo --- 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];