Skip to content

Commit

Permalink
fs/proc/array.c: change do_task_stat() to use while_each_thread()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: KOSAKI Motohiro <[email protected]>
Cc: Al Viro <[email protected]>
Cc: Kees Cook <[email protected]>
Reviewed-by: Sameer Nanda <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
oleg-nesterov authored and torvalds committed Jan 24, 2014
1 parent 98611e4 commit 185ee40
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/proc/array.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 185ee40

Please sign in to comment.