Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2e1f3835 authored by Oleg Nesterov's avatar Oleg Nesterov Committed by Linus Torvalds
Browse files

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: default avatarOleg 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: default avatarSameer Nanda <snanda@chromium.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 185ee40e
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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: