From: Oleg Nesterov Date: Thu, 23 Jan 2014 23:55:55 +0000 (-0800) Subject: kernel/sys.c: k_getrusage() can use while_each_thread() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2e1f38358246b8f8e5871026b21d374e9bb1a163;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Cc: KOSAKI Motohiro Cc: Al Viro Cc: Kees Cook Reviewed-by: Sameer Nanda Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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: