public inbox for linux-kernel@vger.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 1/3] proc: change do_task_stat() to use while_each_thread()
Date: Fri, 22 Nov 2013 20:18:18 +0100	[thread overview]
Message-ID: <20131122191818.GA16933@redhat.com> (raw)
In-Reply-To: <20131122191803.GA16919@redhat.com>

do_task_stat() can use while_each_thread(), no changes in
the compiled code.

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

diff --git a/fs/proc/array.c b/fs/proc/array.c
index c995807..c59e74f 100644
--- a/fs/proc/array.c
+++ b/fs/proc/array.c
@@ -442,8 +442,7 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,
 				min_flt += t->min_flt;
 				maj_flt += t->maj_flt;
 				gtime += task_gtime(t);
-				t = next_thread(t);
-			} while (t != task);
+			} while_each_thread(task, t);
 
 			min_flt += sig->min_flt;
 			maj_flt += sig->maj_flt;
-- 
1.5.5.1


  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 ` Oleg Nesterov [this message]
2013-11-22 20:15   ` [PATCH 1/3] proc: change do_task_stat() to use while_each_thread() Sameer Nanda
2013-11-22 19:18 ` [PATCH 2/3] k_getrusage() can " Oleg Nesterov
2013-11-22 20:16   ` 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=20131122191818.GA16933@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox