From: Boris Burkov Date: Thu, 21 Aug 2025 22:51:22 +0000 (-0700) Subject: mm: fix CONFIG_MEMCG build for AS_KERNEL_FILE X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=dfd941aa91669f13c4598365302920f619e08399;p=users%2Fjedix%2Flinux-maple.git mm: fix CONFIG_MEMCG build for AS_KERNEL_FILE this needs to be folded into mm/filemap: add AS_KERNEL_FILE for it to build with CONFIG_MEMCG unset. Apologies for the churn. Link: https://lkml.kernel.org/r/6de59ddeec81b5c294d337c001ba0061631d4ec6.1755816635.git.boris@bur.io Signed-off-by: Boris Burkov Cc: Johannes Weiner Cc: Matthew Wilcox (Oracle) Cc: Michal Hocko Cc: Muchun Song Cc: Qu Wenruo Cc: Roman Gushchin Cc: Shakeel Butt Signed-off-by: Andrew Morton --- diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 9fa3afc90dd52..e693978b20229 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h @@ -1059,6 +1059,8 @@ extern int mem_cgroup_init(void); #define MEM_CGROUP_ID_SHIFT 0 +#define root_mem_cgroup (NULL) + static inline struct mem_cgroup *folio_memcg(struct folio *folio) { return NULL;