mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-27 09:02:06 +00:00
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
This commit is contained in:
parent
69ca310f34
commit
a61daaf351
1 changed files with 1 additions and 1 deletions
|
@ -37,7 +37,7 @@ retry:
|
||||||
if (!task) {
|
if (!task) {
|
||||||
++*tid;
|
++*tid;
|
||||||
goto retry;
|
goto retry;
|
||||||
} else if (skip_if_dup_files && task->tgid != task->pid &&
|
} else if (skip_if_dup_files && !thread_group_leader(task) &&
|
||||||
task->files == task->group_leader->files) {
|
task->files == task->group_leader->files) {
|
||||||
put_task_struct(task);
|
put_task_struct(task);
|
||||||
task = NULL;
|
task = NULL;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue