diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c index 3cb53840804392f0adc914a68e01f1cf36611dd0..b63b1f0fac905a31349895b0834f1e8b26f6a12c 100644 --- a/kernel/bpf/btf.c +++ b/kernel/bpf/btf.c @@ -6430,6 +6430,7 @@ static struct bpf_cand_cache *populate_cand_cache(struct bpf_cand_cache *cands, return new_cands; } +#ifdef CONFIG_DEBUG_INFO_BTF_MODULES static void __purge_cand_cache(struct btf *btf, struct bpf_cand_cache **cache, int cache_size) { @@ -6468,6 +6469,7 @@ static void purge_cand_cache(struct btf *btf) __purge_cand_cache(btf, module_cand_cache, MODULE_CAND_CACHE_SIZE); mutex_unlock(&cand_cache_mutex); } +#endif static struct bpf_cand_cache * bpf_core_add_cands(struct bpf_cand_cache *cands, const struct btf *targ_btf,