On Wed, Nov 29, 2023 at 1:34 PM Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote: > > On Wed, 29 Nov 2023 23:42:15 +0800 kernel test robot <lkp@xxxxxxxxx> wrote: > > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable > > head: cb1d236cb1038fa1bbae9913803f1c655b86d931 > > commit: 70dd375afcfe1839321ea8a65749404a99f0e773 [179/192] zswap: make shrinking memcg-aware > > config: s390-randconfig-r071-20231129 (https://download.01.org/0day-ci/archive/20231129/202311292305.43bnw55s-lkp@xxxxxxxxx/config) > > compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07) > > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231129/202311292305.43bnw55s-lkp@xxxxxxxxx/reproduce) > > > > ... > > > > >> mm/zswap.c:298:24: error: call to undeclared function 'obj_cgroup_memcg'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] > > return entry->objcg ? obj_cgroup_memcg(entry->objcg) : NULL; > > ^ > > mm/zswap.c:298:24: note: did you mean 'obj_cgroup_put'? > > include/linux/memcontrol.h:1352:20: note: 'obj_cgroup_put' declared here > > Well I'm going to assume it's this: > > --- a/mm/zswap.c~zswap-make-shrinking-memcg-aware-fix > +++ a/mm/zswap.c > @@ -29,6 +29,7 @@ > #include <linux/zpool.h> > #include <crypto/acompress.h> > #include <linux/zswap.h> > +#include <linux/memcontrol.h> > #include <linux/mm_types.h> > #include <linux/page-flags.h> > #include <linux/swapops.h> > _ > > Can't test because my gcc plugins have gone stupid yet again. > > cc1: error: cannot load plugin ./scripts/gcc-plugins/stackleak_plugin.so: ./scripts/gcc-plugins/stackleak_plugin.so: undefined symbol: _ZNK6frange6acceptERK14vrange_visitor > cc1: error: cannot load plugin ./scripts/gcc-plugins/randomize_layout_plugin.so: ./scripts/gcc-plugins/randomize_layout_plugin.so: undefined symbol: _ZNK6frange6acceptERK14vrange_visitor > > help. Hmm I tried including memcontrol.h, and it still screams at me the same way with !CONFIG_MEMCG. I think obj_cgroup_memcg() is just not defined in this case. Let's just return NULL here when !CONFIG_MEMCG.