Hi Boris, kernel test robot noticed the following build errors: [auto build test ERROR on akpm-mm/mm-everything] [also build test ERROR on kdave/for-next linus/master v6.17-rc2 next-20250822] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Boris-Burkov/mm-filemap-add-AS_KERNEL_FILE/20250822-055741 base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything patch link: https://lore.kernel.org/r/f09c4e2c90351d4cb30a1969f7a863b9238bd291.1755812945.git.boris%40bur.io patch subject: [PATCH v4 1/3] mm/filemap: add AS_KERNEL_FILE config: x86_64-buildonly-randconfig-006-20250822 (https://download.01.org/0day-ci/archive/20250822/202508222105.tg88NxnV-lkp@xxxxxxxxx/config) compiler: gcc-12 (Debian 12.2.0-14+deb12u1) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250822/202508222105.tg88NxnV-lkp@xxxxxxxxx/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-kbuild-all/202508222105.tg88NxnV-lkp@xxxxxxxxx/ All errors (new ones prefixed by >>): mm/filemap.c: In function 'filemap_add_folio': >> mm/filemap.c:967:40: error: 'root_mem_cgroup' undeclared (first use in this function); did you mean 'parent_mem_cgroup'? 967 | tmp = set_active_memcg(root_mem_cgroup); | ^~~~~~~~~~~~~~~ | parent_mem_cgroup mm/filemap.c:967:40: note: each undeclared identifier is reported only once for each function it appears in vim +967 mm/filemap.c 957 958 int filemap_add_folio(struct address_space *mapping, struct folio *folio, 959 pgoff_t index, gfp_t gfp) 960 { 961 void *shadow = NULL; 962 int ret; 963 struct mem_cgroup *tmp; 964 bool kernel_file = test_bit(AS_KERNEL_FILE, &mapping->flags); 965 966 if (kernel_file) > 967 tmp = set_active_memcg(root_mem_cgroup); 968 ret = mem_cgroup_charge(folio, NULL, gfp); 969 if (kernel_file) 970 set_active_memcg(tmp); 971 if (ret) 972 return ret; 973 974 __folio_set_locked(folio); 975 ret = __filemap_add_folio(mapping, folio, index, gfp, &shadow); 976 if (unlikely(ret)) { 977 mem_cgroup_uncharge(folio); 978 __folio_clear_locked(folio); 979 } else { 980 /* 981 * The folio might have been evicted from cache only 982 * recently, in which case it should be activated like 983 * any other repeatedly accessed folio. 984 * The exception is folios getting rewritten; evicting other 985 * data from the working set, only to cache data that will 986 * get overwritten with something else, is a waste of memory. 987 */ 988 WARN_ON_ONCE(folio_test_active(folio)); 989 if (!(gfp & __GFP_WRITE) && shadow) 990 workingset_refault(folio, shadow); 991 folio_add_lru(folio); 992 } 993 return ret; 994 } 995 EXPORT_SYMBOL_GPL(filemap_add_folio); 996 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki