]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mds/Migrator.cc: remove unneeded use of count
authorMichal Jarzabek <stiopa@gmail.com>
Sun, 16 Oct 2016 14:46:45 +0000 (15:46 +0100)
committerMichal Jarzabek <stiopa@gmail.com>
Mon, 17 Oct 2016 20:52:24 +0000 (21:52 +0100)
Signed-off-by: Michal Jarzabek <stiopa@gmail.com>
src/mds/Migrator.cc

index 501216d079e19686e50076605eae42e471625486..79abe7091efe6560ebbccded01cee0b5ed33e67e 100644 (file)
@@ -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