From 872b249a16594add731380c618bb4622beb56462 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Sun, 27 Oct 2024 17:59:41 -0700 Subject: [PATCH] memcg-workingset-remove-folio_memcg_rcu-usage-fix fix build: provide folio_memcg_charged stub for CONFIG_MEMCG=n Reported-by: Stephen Rothwell Cc: Hugh Dickins Cc: Johannes Weiner Cc: Michal Hocko Cc: Muchun Song Cc: Roman Gushchin Cc: Shakeel Butt Cc: Yosry Ahmed Cc: Yu Zhao Signed-off-by: Andrew Morton --- include/linux/memcontrol.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 89a1e9f10e1b..5502aa8e138e 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h @@ -1055,6 +1055,11 @@ static inline struct mem_cgroup *folio_memcg(struct folio *folio) return NULL; } +static inline bool folio_memcg_charged(struct folio *folio) +{ + return false; +} + static inline struct mem_cgroup *folio_memcg_check(struct folio *folio) { return NULL; -- 2.49.0