From 034b3b865fa866f4110c44230c02c4be3d3a9866 Mon Sep 17 00:00:00 2001 From: Michal Jarzabek Date: Sun, 16 Oct 2016 15:46:45 +0100 Subject: [PATCH] mds/Migrator.cc: remove unneeded use of count Signed-off-by: Michal Jarzabek --- src/mds/Migrator.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/mds/Migrator.cc b/src/mds/Migrator.cc index 501216d079e1..79abe7091efe 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 -- 2.47.3