This patch fixes wrong stats calulation in __folio_remove_rmap().
diff --git a/mm/rmap.c b/mm/rmap.c
index 52357d79917c..f9aeabd691fa 100644
@@ -1567,7 +1567,7 @@ static __always_inline void __folio_remove_rmap(struct folio *folio,
list_empty(&folio->_deferred_list))
deferred_split_folio(folio);
- __folio_mod_stat(folio, nr, nr_pmdmapped);
+ __folio_mod_stat(folio, -nr, -nr_pmdmapped);
* It would be tidy to reset folio_test_anon mapping when fully
Disclaimer: This email is intended to be read only by the designated recipient of the document and has high confidentiality requirements. Anyone else is prohibited from using, opening, copying or forwarding any of the contents inside. If this email was sent to you by mistake, please contact the sender of the email and delete this file immediately. Confidentiality and legal privileges are not waived or lost by misdirected emails. Any views or opinions expressed in the email are those of the author and do not necessarily represent those of the Company.