aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/bpf/arraymap.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/bpf/arraymap.c')
-rw-r--r--kernel/bpf/arraymap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/bpf/arraymap.c b/kernel/bpf/arraymap.c
index 02a189339381..0fd8d8f1a398 100644
--- a/kernel/bpf/arraymap.c
+++ b/kernel/bpf/arraymap.c
@@ -526,7 +526,7 @@ static u32 prog_fd_array_sys_lookup_elem(void *ptr)
526} 526}
527 527
528/* decrement refcnt of all bpf_progs that are stored in this map */ 528/* decrement refcnt of all bpf_progs that are stored in this map */
529void bpf_fd_array_map_clear(struct bpf_map *map) 529static void bpf_fd_array_map_clear(struct bpf_map *map)
530{ 530{
531 struct bpf_array *array = container_of(map, struct bpf_array, map); 531 struct bpf_array *array = container_of(map, struct bpf_array, map);
532 int i; 532 int i;
@@ -545,6 +545,7 @@ const struct bpf_map_ops prog_array_map_ops = {
545 .map_fd_get_ptr = prog_fd_array_get_ptr, 545 .map_fd_get_ptr = prog_fd_array_get_ptr,
546 .map_fd_put_ptr = prog_fd_array_put_ptr, 546 .map_fd_put_ptr = prog_fd_array_put_ptr,
547 .map_fd_sys_lookup_elem = prog_fd_array_sys_lookup_elem, 547 .map_fd_sys_lookup_elem = prog_fd_array_sys_lookup_elem,
548 .map_release_uref = bpf_fd_array_map_clear,
548}; 549};
549 550
550static struct bpf_event_entry *bpf_event_entry_gen(struct file *perf_file, 551static struct bpf_event_entry *bpf_event_entry_gen(struct file *perf_file,