Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

bpf: Remove unnecessary arguments from bpf_async_set_callback()

Remove unused arguments from __bpf_async_set_callback().

Signed-off-by: Mykyta Yatsenko <yatsenko@meta.com>
Link: https://lore.kernel.org/r/20260120-timer_nolock-v6-2-670ffdd787b4@meta.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>

authored by

Mykyta Yatsenko and committed by
Alexei Starovoitov
57d31e72 c1f2c449

+4 -5
+4 -5
kernel/bpf/helpers.c
··· 1355 1355 }; 1356 1356 1357 1357 static int __bpf_async_set_callback(struct bpf_async_kern *async, void *callback_fn, 1358 - struct bpf_prog_aux *aux, unsigned int flags, 1359 - enum bpf_async_type type) 1358 + struct bpf_prog *prog) 1360 1359 { 1361 - struct bpf_prog *prev, *prog = aux->prog; 1360 + struct bpf_prog *prev; 1362 1361 struct bpf_async_cb *cb; 1363 1362 int ret = 0; 1364 1363 ··· 1402 1403 BPF_CALL_3(bpf_timer_set_callback, struct bpf_async_kern *, timer, void *, callback_fn, 1403 1404 struct bpf_prog_aux *, aux) 1404 1405 { 1405 - return __bpf_async_set_callback(timer, callback_fn, aux, 0, BPF_ASYNC_TYPE_TIMER); 1406 + return __bpf_async_set_callback(timer, callback_fn, aux->prog); 1406 1407 } 1407 1408 1408 1409 static const struct bpf_func_proto bpf_timer_set_callback_proto = { ··· 3136 3137 if (flags) 3137 3138 return -EINVAL; 3138 3139 3139 - return __bpf_async_set_callback(async, callback_fn, aux, flags, BPF_ASYNC_TYPE_WQ); 3140 + return __bpf_async_set_callback(async, callback_fn, aux->prog); 3140 3141 } 3141 3142 3142 3143 __bpf_kfunc void bpf_preempt_disable(void)