[Devel] [PATCH vz9] mm: fix warn_on condition
Alexander Atanasov
alexander.atanasov at virtuozzo.com
Fri Feb 10 16:46:49 MSK 2023
WARN_ON used a wrong logic operator so the warning triggered
with no reason. This slipped on rebase. Use the proper condition
so the warning is valid.
Fixes: b8bc3dbf5e18 ("mm: per memory cgroup page cache limit")
https://jira.sw.ru/browse/PSBM-144609
Signed-off-by: Alexander Atanasov <alexander.atanasov at virtuozzo.com>
---
mm/memcontrol.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 025e38242681..30a9c52f5b7f 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -7686,7 +7686,7 @@ void mem_cgroup_migrate(struct folio *old, struct folio *new)
page_counter_charge(&memcg->memsw, nr_pages);
}
- WARN_ON((!PageAnon(&new->page) && !PageSwapBacked(&new->page)) |
+ WARN_ON((!PageAnon(&new->page) && !PageSwapBacked(&new->page)) !=
folio_memcg_cache(new));
if (folio_memcg_cache(new))
--
2.31.1
More information about the Devel
mailing list