diff options
author | YiFei Zhu <zhuyifei@google.com> | 2020-07-24 23:17:53 +0200 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2020-07-26 05:16:36 +0200 |
commit | dfcdf0e9ad2e006196986f363c99b2097aec5ef0 (patch) | |
tree | 2ecce143cc0583c7bf16b1fcafe5f9c8c86d7865 /kernel | |
parent | Merge branch 'shared-cgroup-storage' (diff) | |
download | linux-dfcdf0e9ad2e006196986f363c99b2097aec5ef0.tar.xz linux-dfcdf0e9ad2e006196986f363c99b2097aec5ef0.zip |
bpf/local_storage: Fix build without CONFIG_CGROUP
local_storage.o has its compile guard as CONFIG_BPF_SYSCALL, which
does not imply that CONFIG_CGROUP is on. Including cgroup-internal.h
when CONFIG_CGROUP is off cause a compilation failure.
Fixes: f67cfc233706 ("bpf: Make cgroup storages shared between programs on the same cgroup")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: YiFei Zhu <zhuyifei@google.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200724211753.902969-1-zhuyifei1999@gmail.com
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/bpf/local_storage.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/bpf/local_storage.c b/kernel/bpf/local_storage.c index 3b2c70197d78..571bb351ed3b 100644 --- a/kernel/bpf/local_storage.c +++ b/kernel/bpf/local_storage.c @@ -9,12 +9,12 @@ #include <linux/slab.h> #include <uapi/linux/btf.h> -#include "../cgroup/cgroup-internal.h" - DEFINE_PER_CPU(struct bpf_cgroup_storage*, bpf_cgroup_storage[MAX_BPF_CGROUP_STORAGE_TYPE]); #ifdef CONFIG_CGROUP_BPF +#include "../cgroup/cgroup-internal.h" + #define LOCAL_STORAGE_CREATE_FLAG_MASK \ (BPF_F_NUMA_NODE | BPF_F_ACCESS_MASK) |