]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Use thread_group_leader()
authorJonathan Lemon <bsd@fb.com>
Fri, 18 Dec 2020 18:50:31 +0000 (10:50 -0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 24 Dec 2020 01:04:53 +0000 (02:04 +0100)
commit36d98a414f9fd7c68f9afd12b53eb84851d79cde
tree423747adcf3211c9b13bef6bd7b165b03b315ff8
parent1e81ca1512d67a6bda9ae2b877a87877099be106
bpf: Use thread_group_leader()

Instead of directly comparing task->tgid and task->pid, use the
thread_group_leader() helper.  This helps with readability, and
there should be no functional change.

Signed-off-by: Jonathan Lemon <jonathan.lemon@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20201218185032.2464558-3-jonathan.lemon@gmail.com
kernel/bpf/task_iter.c