From: Shakeel Butt Commit a4055888629bc ("mm/memcg: warning on !memcg after readahead page charged") added the warning in folio_lruvec (older name was mem_cgroup_page_lruvec) for !memcg when charging of readahead pages were added to the kernel. Basically lru pages on a memcg enabled system were always expected to be charged to a memcg. However a recent functionality to allow metadata of btrfs, which is in page cache, to be uncharged is added to the kernel. We can either change the condition to only check anon pages or file pages which does not have AS_UNCHARGED in their mapping. Instead of such complicated check, let's just remove the warning as it is not really helpful anymore. Closes: https://ci.syzbot.org/series/15fd2538-1138-43c0-b4d6-6d7f53b0be69 Signed-off-by: Shakeel Butt --- include/linux/memcontrol.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 9fa3afc90dd5..fae105a9cb46 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h @@ -729,10 +729,7 @@ static inline struct lruvec *mem_cgroup_lruvec(struct mem_cgroup *memcg, */ static inline struct lruvec *folio_lruvec(struct folio *folio) { - struct mem_cgroup *memcg = folio_memcg(folio); - - VM_WARN_ON_ONCE_FOLIO(!memcg && !mem_cgroup_disabled(), folio); - return mem_cgroup_lruvec(memcg, folio_pgdat(folio)); + return mem_cgroup_lruvec(folio_memcg(folio), folio_pgdat(folio)); } struct mem_cgroup *mem_cgroup_from_task(struct task_struct *p); -- 2.50.1