All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Michal Hocko <mhocko@suse.cz>, Sameer Nanda <snanda@chromium.org>,
	Sergey Dyasly <dserrg@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 2/3] k_getrusage() can use while_each_thread()
Date: Fri, 22 Nov 2013 20:18:20 +0100	[thread overview]
Message-ID: <20131122191820.GA16936@redhat.com> (raw)
In-Reply-To: <20131122191803.GA16919@redhat.com>

Change k_getrusage() to use while_each_thread(), no changes in
the compiled code.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
---
 kernel/sys.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/kernel/sys.c b/kernel/sys.c
index 1d9a218..70d56d6 100644
--- a/kernel/sys.c
+++ b/kernel/sys.c
@@ -1572,8 +1572,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:
-- 
1.5.5.1


  parent reply	other threads:[~2013-11-22 19:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-22 19:18 [PATCH 0/3] more next_thread/while_each_thread changes Oleg Nesterov
2013-11-22 19:18 ` [PATCH 1/3] proc: change do_task_stat() to use while_each_thread() Oleg Nesterov
2013-11-22 20:15   ` Sameer Nanda
2013-11-22 19:18 ` Oleg Nesterov [this message]
2013-11-22 20:16   ` [PATCH 2/3] k_getrusage() can " Sameer Nanda
2013-11-22 19:18 ` [PATCH 3/3] signals: change do_signal_stop/do_sigaction to " Oleg Nesterov
2013-11-22 20:17   ` Sameer Nanda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131122191820.GA16936@redhat.com \
    --to=oleg@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=dserrg@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhocko@suse.cz \
    --cc=snanda@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.