mirror of
https://github.com/ceph/ceph
synced 2025-02-24 19:47:44 +00:00
mds: fix MDCache::trim() with max == 0
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>
This commit is contained in:
parent
9b97554f0a
commit
2f50921492
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user