Skip to content

Commit 185ee40

Browse files
oleg-nesterovtorvalds
authored andcommitted
fs/proc/array.c: change do_task_stat() to use while_each_thread()
Change the remaining next_thread (ab)users to use while_each_thread(). The last user which should be changed is next_tid(), but we can't do this now. __exit_signal() and complete_signal() are fine, they actually need next_thread() logic. This patch (of 3): do_task_stat() can use while_each_thread(), no changes in the compiled code. Signed-off-by: Oleg Nesterov <oleg@redhat.com> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Kees Cook <keescook@chromium.org> Reviewed-by: Sameer Nanda <snanda@chromium.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 98611e4 commit 185ee40

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎fs/proc/array.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,8 +444,7 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,
444444
min_flt += t->min_flt;
445445
maj_flt += t->maj_flt;
446446
gtime += task_gtime(t);
447-
t = next_thread(t);
448-
} while (t != task);
447+
} while_each_thread(task, t);
449448

450449
min_flt += sig->min_flt;
451450
maj_flt += sig->maj_flt;

0 commit comments

Comments
 (0)