libbpf: Stop using deprecated bpf_map__is_offload_neutral()

Open-code bpf_map__is_offload_neutral() logic in one place in
to-be-deprecated bpf_prog_load_xattr2.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Quentin Monnet <quentin@isovalent.com>
Link: https://lore.kernel.org/bpf/20220202225916.3313522-2-andrii@kernel.org
This commit is contained in:
Andrii Nakryiko 2022-02-02 14:59:11 -08:00 committed by Daniel Borkmann
parent 707ee8ac3a
commit a5dd9589f0
1 changed files with 1 additions and 1 deletions

View File

@ -9505,7 +9505,7 @@ static int bpf_prog_load_xattr2(const struct bpf_prog_load_attr *attr,
} }
bpf_object__for_each_map(map, obj) { bpf_object__for_each_map(map, obj) {
if (!bpf_map__is_offload_neutral(map)) if (map->def.type != BPF_MAP_TYPE_PERF_EVENT_ARRAY)
map->map_ifindex = attr->ifindex; map->map_ifindex = attr->ifindex;
} }