]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
fs/proc/array.c: change do_task_stat() to use while_each_thread()
authorOleg Nesterov <oleg@redhat.com>
Thu, 23 Jan 2014 23:55:53 +0000 (15:55 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 24 Jan 2014 00:37:02 +0000 (16:37 -0800)
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>
fs/proc/array.c

index 554a0b229ac235818dd8879d9f49d31393169b6e..656e401794de5f8e2b03e975130cd3546ed5ed27 100644 (file)
@@ -444,8 +444,7 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,
                                min_flt += t->min_flt;
                                maj_flt += t->maj_flt;
                                gtime += task_gtime(t);
-                               t = next_thread(t);
-                       } while (t != task);
+                       } while_each_thread(task, t);
 
                        min_flt += sig->min_flt;
                        maj_flt += sig->maj_flt;