From: Michal Jarzabek Date: Sun, 16 Oct 2016 14:46:45 +0000 (+0100) Subject: mds/Migrator.cc: remove unneeded use of count X-Git-Tag: v11.1.0~561^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=034b3b865fa866f4110c44230c02c4be3d3a9866;p=ceph.git mds/Migrator.cc: remove unneeded use of count Signed-off-by: Michal Jarzabek --- diff --git a/src/mds/Migrator.cc b/src/mds/Migrator.cc index 501216d079e..79abe7091ef 100644 --- a/src/mds/Migrator.cc +++ b/src/mds/Migrator.cc @@ -409,8 +409,7 @@ void Migrator::handle_mds_failure_or_stop(mds_rank_t who) export_try_cancel(dir); } else { // bystander failed. - if (p->second.warning_ack_waiting.count(who)) { - p->second.warning_ack_waiting.erase(who); + if (p->second.warning_ack_waiting.erase(who)) { p->second.notify_ack_waiting.erase(who); // they won't get a notify either. if (p->second.state == EXPORT_WARNING) { // exporter waiting for warning acks, let's fake theirs. @@ -421,8 +420,7 @@ void Migrator::handle_mds_failure_or_stop(mds_rank_t who) export_go(dir); } } - if (p->second.notify_ack_waiting.count(who)) { - p->second.notify_ack_waiting.erase(who); + if (p->second.notify_ack_waiting.erase(who)) { if (p->second.state == EXPORT_NOTIFYING) { // exporter is waiting for notify acks, fake it dout(10) << "faking export_notify_ack from mds." << who