]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: drop redundant existence check of osd 10450/head
authorxie xingguo <xie.xingguo@zte.com.cn>
Wed, 27 Jul 2016 08:33:29 +0000 (16:33 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Wed, 27 Jul 2016 22:30:02 +0000 (06:30 +0800)
The is_up() check implicitly coveres the exist() check,
so below here the exist() check is not necessary.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/osd/OSD.cc

index b94a3fd7a80370b8d4ecfd69eeab8f50c48f09d1..677caee0d29fd3c13e21b18386f1853380af968e 100644 (file)
@@ -6874,8 +6874,8 @@ void OSD::_committed_osd_maps(epoch_t first, epoch_t last, MOSDMap *m)
     osdmap->get_all_osds(old);
     for (set<int>::iterator p = old.begin(); p != old.end(); ++p) {
       if (*p != whoami &&
-         osdmap->have_inst(*p) &&                        // in old map
-         (!newmap->exists(*p) || !newmap->is_up(*p))) {  // but not the new one
+         osdmap->have_inst(*p) && // in old map
+         !newmap->is_up(*p)) {    // but not the new one
         if (!waited_for_reservations) {
           service.await_reserved_maps();
           waited_for_reservations = true;