From: Oleg Nesterov <oleg@tv-sign.ru>
To: "Eric W. Biederman" <ebiederm@xmission.com>,
Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] cleanup next_tid()
Date: Sun, 19 Mar 2006 22:26:00 +0300 [thread overview]
Message-ID: <441DB048.A8349576@tv-sign.ru> (raw)
This patch tries to make next_tid() a bit more readable
and deletes unnecessary "pid_alive(pos)" check.
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
--- MM/fs/proc/base.c~ 2006-03-20 00:02:08.000000000 +0300
+++ MM/fs/proc/base.c 2006-03-20 00:52:02.000000000 +0300
@@ -2215,15 +2215,15 @@ out:
*/
static struct task_struct *next_tid(struct task_struct *start)
{
- struct task_struct *pos;
+ struct task_struct *pos = NULL;
rcu_read_lock();
- pos = start;
- if (pid_alive(start))
- pos = next_thread(start);
- if (pid_alive(pos) && (pos != start->group_leader))
- get_task_struct(pos);
- else
- pos = NULL;
+ if (pid_alive(start)) {
+ pos = next_thread(start);
+ if (thread_group_leader(pos))
+ pos = NULL;
+ else
+ get_task_struct(pos);
+ }
rcu_read_unlock();
put_task_struct(start);
return pos;
reply other threads:[~2006-03-19 19:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=441DB048.A8349576@tv-sign.ru \
--to=oleg@tv-sign.ru \
--cc=akpm@osdl.org \
--cc=ebiederm@xmission.com \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®