]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/PG: clear missing_loc properly if last location is gone
authorxie xingguo <xie.xingguo@zte.com.cn>
Wed, 25 Jul 2018 08:04:53 +0000 (16:04 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Wed, 25 Jul 2018 08:04:53 +0000 (16:04 +0800)
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/osd/PG.h

index 9a4ee13a9fba5aa853b606242d47bd4daec1ca5c..39a40b13a53e33de7a674f01dbd6e742e5f0d029 100644 (file)
@@ -786,7 +786,11 @@ protected:
       if (p != missing_loc.end()) {
        _dec_count(p->second);
        p->second.erase(location);
-       _inc_count(p->second);
+        if (p->second.empty()) {
+          missing_loc.erase(p);
+        } else {
+          _inc_count(p->second);
+        }
       }
     }