mirror of
https://github.com/ceph/ceph
synced 2025-01-15 23:43:06 +00:00
Merge pull request #11625 from stiopaa1/mds_damageTable_removeUnneededCount
mds/DamageTable.cc: remove unneeded use of count Reviewed-by: Greg Farnum <gfarnum@redhat.com>
This commit is contained in:
commit
c88a71a8a8
@ -244,11 +244,12 @@ void DamageTable::dump(Formatter *f) const
|
||||
|
||||
void DamageTable::erase(damage_entry_id_t damage_id)
|
||||
{
|
||||
if (by_id.count(damage_id) == 0) {
|
||||
auto by_id_entry = by_id.find(damage_id);
|
||||
if (by_id_entry == by_id.end()) {
|
||||
return;
|
||||
}
|
||||
|
||||
DamageEntryRef entry = by_id.at(damage_id);
|
||||
DamageEntryRef entry = by_id_entry->second;
|
||||
assert(entry->id == damage_id); // Sanity
|
||||
|
||||
const auto type = entry->get_type();
|
||||
@ -266,6 +267,6 @@ void DamageTable::erase(damage_entry_id_t damage_id)
|
||||
assert(0);
|
||||
}
|
||||
|
||||
by_id.erase(damage_id);
|
||||
by_id.erase(by_id_entry);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user