mirror of
https://github.com/ceph/ceph
synced 2024-12-28 06:23:08 +00:00
Merge pull request #19770 from shinobu-x/mempool_lock
common: s/unique_lock/lock_guard/, if manual lock/unlock are not necessary Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
This commit is contained in:
commit
8d5da83ba0
@ -100,7 +100,7 @@ void mempool::pool_t::get_stats(
|
||||
total->bytes += shard[i].bytes;
|
||||
}
|
||||
if (debug_mode) {
|
||||
std::unique_lock<std::mutex> shard_lock(lock);
|
||||
std::lock_guard<std::mutex> shard_lock(lock);
|
||||
for (auto &p : type_map) {
|
||||
std::string n = ceph_demangle(p.second.type_name);
|
||||
stats_t &s = (*by_type)[n];
|
||||
|
Loading…
Reference in New Issue
Block a user