]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix MDCache::trim() with max == 0 12794/head
authorYan, Zheng <zyan@redhat.com>
Wed, 11 Jan 2017 09:14:53 +0000 (17:14 +0800)
committerYan, Zheng <zyan@redhat.com>
Wed, 11 Jan 2017 09:16:45 +0000 (17:16 +0800)
MDCache::shutdown_pass call MDCache::trim with max == 0. If the last
dentry is non-null, MDCache::trim does nothing

Signed-off-by: Yan, Zheng <zyan@redhat.com>
src/mds/MDCache.cc

index 8d0d3a005bc9410c524728e7338b63eb178de1a8..e9bf26df2d45fc79eb75aae55fc4ec04b78fc4a6 100644 (file)
@@ -6385,7 +6385,7 @@ bool MDCache::trim(int max, int count)
     }
     if (!dn->get_linkage()->is_null()) {
       trimming_nulls = false;
-      if (lru.lru_get_size() + unexpirable <= (unsigned)max) {
+      if (lru.lru_get_size() + unexpirable < (unsigned)max) {
        unexpirables.push_back(dn);
        break;
       }