]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/OSDMonitor: drop redundant null check of max_failed_since
authorxie xingguo <xie.xingguo@zte.com.cn>
Thu, 11 Aug 2016 03:39:11 +0000 (11:39 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Wed, 17 Aug 2016 04:37:13 +0000 (12:37 +0800)
Because the "max_failed_since < failed_since" will catch both.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/mon/OSDMonitor.h

index aff5b1bf83e6e9ed8f9427a717ccc2698a9196f3..7a066699eca216116fd4436232d4401fb9fe44a1 100644 (file)
@@ -78,9 +78,7 @@ struct failure_info_t {
                             MonOpRequestRef op) {
     map<int, failure_reporter_t>::iterator p = reporters.find(who);
     if (p == reporters.end()) {
-      if (max_failed_since == utime_t())
-       max_failed_since = failed_since;
-      else if (max_failed_since < failed_since)
+      if (max_failed_since < failed_since)
        max_failed_since = failed_since;
       p = reporters.insert(map<int, failure_reporter_t>::value_type(who, failure_reporter_t(failed_since))).first;
     }