From: xie xingguo Date: Wed, 27 Jul 2016 08:33:29 +0000 (+0800) Subject: osd: drop redundant existence check of osd X-Git-Tag: ses5-milestone5~237^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F10450%2Fhead;p=ceph.git osd: drop redundant existence check of osd The is_up() check implicitly coveres the exist() check, so below here the exist() check is not necessary. Signed-off-by: xie xingguo --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index b94a3fd7a80..677caee0d29 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -6874,8 +6874,8 @@ void OSD::_committed_osd_maps(epoch_t first, epoch_t last, MOSDMap *m) osdmap->get_all_osds(old); for (set::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;