diff options
author | Daniel Xu <dxu@dxuuu.xyz> | 2021-08-24 04:43:47 +0200 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2021-08-25 19:37:05 +0200 |
commit | 33c5cb36015ac1034b50b823fae367e908d05147 (patch) | |
tree | 79482778198c299e50ec4153dede146ae87d9984 /kernel/trace | |
parent | bpf: Add BTF_ID_LIST_GLOBAL_SINGLE macro (diff) | |
download | linux-33c5cb36015ac1034b50b823fae367e908d05147.tar.xz linux-33c5cb36015ac1034b50b823fae367e908d05147.zip |
bpf: Consolidate task_struct BTF_ID declarations
No need to have it defined 5 times. Once is enough.
Signed-off-by: Daniel Xu <dxu@dxuuu.xyz>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/6dcefa5bed26fe1226f26683f36819bb53ec19a2.1629772842.git.dxu@dxuuu.xyz
Diffstat (limited to 'kernel/trace')
-rw-r--r-- | kernel/trace/bpf_trace.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c index cbc73c08c4a4..50d055fc2327 100644 --- a/kernel/trace/bpf_trace.c +++ b/kernel/trace/bpf_trace.c @@ -714,13 +714,13 @@ BPF_CALL_0(bpf_get_current_task_btf) return (unsigned long) current; } -BTF_ID_LIST_SINGLE(bpf_get_current_btf_ids, struct, task_struct) +BTF_ID_LIST_GLOBAL_SINGLE(btf_task_struct_ids, struct, task_struct) static const struct bpf_func_proto bpf_get_current_task_btf_proto = { .func = bpf_get_current_task_btf, .gpl_only = true, .ret_type = RET_PTR_TO_BTF_ID, - .ret_btf_id = &bpf_get_current_btf_ids[0], + .ret_btf_id = &btf_task_struct_ids[0], }; BPF_CALL_2(bpf_current_task_under_cgroup, struct bpf_map *, map, u32, idx) |