Skip to content
Commit ac8148d9 authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Alexei Starovoitov
Browse files

bpf: bpf_iter_task_next: use next_task(kit->task) rather than next_task(kit->pos)



This looks more clear and simplifies the code. While at it, remove the
unnecessary initialization of pos/task at the start of bpf_iter_task_new().

Note that we can even kill kit->task, we can just use pos->group_leader,
but I don't understand the BUILD_BUG_ON() checks in bpf_iter_task_new().

Signed-off-by: default avatarOleg Nesterov <oleg@redhat.com>
Acked-by: default avatarYonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20231114163239.GA903@redhat.com
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 5a34f9da
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment