Commit 821a3fa3 authored by Xu Kuohai's avatar Xu Kuohai Committed by Alexei Starovoitov
Browse files

bpf: Use function pointers count as struct_ops links count



Only function pointers in a struct_ops structure can be linked to bpf
progs, so set the links count to the function pointers count, instead
of the total members count in the structure.

Suggested-by: default avatarMartin KaFai Lau <martin.lau@linux.dev>
Signed-off-by: default avatarXu Kuohai <xukuohai@huawei.com>
Link: https://lore.kernel.org/r/20241112145849.3436772-3-xukuohai@huaweicloud.com


Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent bd9d9b48
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment