diff options
author | Oleg Nesterov <oleg@redhat.com> | 2014-01-23 18:55:55 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-23 19:37:02 -0500 |
commit | 2e1f38358246b8f8e5871026b21d374e9bb1a163 (patch) | |
tree | b8688891fbf1f64622e60117b092561040cd794f /kernel | |
parent | 185ee40ee7fd1ecfc6575e8cefa2331218d1eca2 (diff) |
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>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sys.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/sys.c b/kernel/sys.c index ecd3ea12f72a..c0a58be780a4 100644 --- a/kernel/sys.c +++ b/kernel/sys.c | |||
@@ -1571,8 +1571,7 @@ static void k_getrusage(struct task_struct *p, int who, struct rusage *r) | |||
1571 | t = p; | 1571 | t = p; |
1572 | do { | 1572 | do { |
1573 | accumulate_thread_rusage(t, r); | 1573 | accumulate_thread_rusage(t, r); |
1574 | t = next_thread(t); | 1574 | } while_each_thread(p, t); |
1575 | } while (t != p); | ||
1576 | break; | 1575 | break; |
1577 | 1576 | ||
1578 | default: | 1577 | default: |