Merge pull request #15662 from renhwztetecs/renhw-wip-client-trim_cache

client: call the lru_remove() twice,when trim cache

Reviewed-by: Yan, Zheng <zyan@redhat.com>
This commit is contained in:
John Spray 2017-06-21 07:31:27 -04:00 committed by GitHub
commit 32ff1de9f2

View File

@ -608,7 +608,7 @@ void Client::trim_cache(bool trim_kernel_dcache)
if (lru.lru_get_size() <= lru.lru_get_max()) break;
// trim!
Dentry *dn = static_cast<Dentry*>(lru.lru_expire());
Dentry *dn = static_cast<Dentry*>(lru.lru_get_next_expire());
if (!dn)
break; // done