Messages in this thread Patch in this message | | | Date | Sat, 9 Sep 2023 18:45:37 +0200 | From | Oleg Nesterov <> | Subject | [PATCH] signal: complete_signal: use __for_each_thread() |
| |
do/while_each_thread should be avoided when possible.
Signed-off-by: Oleg Nesterov <oleg@redhat.com> --- kernel/signal.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/kernel/signal.c b/kernel/signal.c index fc276fc07d87..ccfc3ded5672 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -1058,12 +1058,11 @@ static void complete_signal(int sig, struct task_struct *p, enum pid_type type) signal->flags = SIGNAL_GROUP_EXIT; signal->group_exit_code = sig; signal->group_stop_count = 0; - t = p; - do { + __for_each_thread(signal, t) { task_clear_jobctl_pending(t, JOBCTL_PENDING_MASK); sigaddset(&t->pending.signal, SIGKILL); signal_wake_up(t, 1); - } while_each_thread(p, t); + } return; } } -- 2.25.1.362.g51ebf55
| |