--- a/mm/list_lru.c~mm-list_lru-fix-the-return-value-of-list_lru_count_one +++ a/mm/list_lru.c @@ -176,13 +176,16 @@ unsigned long list_lru_count_one(struct { struct list_lru_node *nlru = &lru->node[nid]; struct list_lru_one *l; - unsigned long count; + long count; rcu_read_lock(); l = list_lru_from_memcg_idx(nlru, memcg_cache_id(memcg)); count = READ_ONCE(l->nr_items); rcu_read_unlock(); + if (unlikely(count < 0)) + count = 0; + return count; } EXPORT_SYMBOL_GPL(list_lru_count_one);