kernel/sys.c: k_getrusage() can use while_each_thread()

Change k_getrusage() to 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>
This commit is contained in:
Oleg Nesterov 2014-01-23 15:55:55 -08:00 committed by Linus Torvalds
parent 185ee40ee7
commit 2e1f383582
1 changed files with 1 additions and 2 deletions

View File

@ -1571,8 +1571,7 @@ static void k_getrusage(struct task_struct *p, int who, struct rusage *r)
t = p; t = p;
do { do {
accumulate_thread_rusage(t, r); accumulate_thread_rusage(t, r);
t = next_thread(t); } while_each_thread(p, t);
} while (t != p);
break; break;
default: default: