]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: use clearer code structure 10192/head
authorPatrick Donnelly <pdonnell@redhat.com>
Thu, 7 Jul 2016 23:09:56 +0000 (19:09 -0400)
committerPatrick Donnelly <pdonnell@redhat.com>
Thu, 7 Jul 2016 23:14:17 +0000 (19:14 -0400)
The failed map is not changed in the first if, so the second if should be an
else.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/mon/MDSMonitor.cc

index ec6f5e37d751a086d483a36cf11335159130c280..67306459d545835839b6765227001fe6681ebc30 100644 (file)
@@ -2840,11 +2840,9 @@ bool MDSMonitor::maybe_promote_standby(std::shared_ptr<Filesystem> fs)
        do_propose = true;
       }
     }
-  }
-
-  // There were no failures to replace, so try using any available standbys
-  // as standby-replay daemons.
-  if (failed.empty()) {
+  } else {
+    // There were no failures to replace, so try using any available standbys
+    // as standby-replay daemons.
     for (const auto &j : pending_fsmap.standby_daemons) {
       const auto &gid = j.first;
       const auto &info = j.second;