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

bpf: task_group_seq_get_next: simplify the "next tid" logic



Kill saved_tid. It looks ugly to update *tid and then restore the
previous value if __task_pid_nr_ns() returns 0. Change this code
to update *tid and common->pid_visiting once before return.

Signed-off-by: default avatarOleg Nesterov <oleg@redhat.com>
Acked-by: default avatarYonghong Song <yonghong.song@linux.dev>
Link: https://lore.kernel.org/r/20230905154656.GA24950@redhat.com


Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
parent 0ee9808b
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