diff options
author | Oleg Nesterov <oleg@redhat.com> | 2014-01-24 00:55:55 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-24 01:37:02 +0100 |
commit | 2e1f38358246b8f8e5871026b21d374e9bb1a163 (patch) | |
tree | b8688891fbf1f64622e60117b092561040cd794f /kernel/sys.c | |
parent | fs/proc/array.c: change do_task_stat() to use while_each_thread() (diff) | |
download | linux-2e1f38358246b8f8e5871026b21d374e9bb1a163.tar.xz linux-2e1f38358246b8f8e5871026b21d374e9bb1a163.zip |
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/sys.c')
-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) t = p; do { accumulate_thread_rusage(t, r); - t = next_thread(t); - } while (t != p); + } while_each_thread(p, t); break; default: |