From: "Raphael S.Carvalho" <raphael.scarv@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>,
Oleg Nesterov <oleg@redhat.com>,
Al Viro <viro@zeniv.linux.org.uk>,
Srikar Dronamraju <srikar@linux.vnet.ibm.com>,
"Eric W. Biederman" <ebiederm@xmission.com>
Cc: linux-kernel@vger.kernel.org,
"Raphael S.Carvalho" <raphael.scarv@gmail.com>
Subject: [PATCH 1/1] kernel/fork.c: Simplifying a snippet of code.
Date: Wed, 20 Feb 2013 17:09:35 -0300 [thread overview]
Message-ID: <1361390975-8831-1-git-send-email-raphael.scarv@gmail.com> (raw)
Just sending this patch in order to simplify the code.
However, I'm not sure if the code was written in that way due to specific reasons.
Signed-off-by: Raphael S.Carvalho <raphael.scarv@gmail.com>
---
kernel/fork.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/kernel/fork.c b/kernel/fork.c
index c535f33..237204d 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1341,9 +1341,7 @@ static struct task_struct *copy_process(unsigned long clone_flags,
}
p->pid = pid_nr(pid);
- p->tgid = p->pid;
- if (clone_flags & CLONE_THREAD)
- p->tgid = current->tgid;
+ p->tgid = (clone_flags & CLONE_THREAD) ? current->tgid : p->pid;
p->set_child_tid = (clone_flags & CLONE_CHILD_SETTID) ? child_tidptr : NULL;
/*
--
1.7.2.5
next reply other threads:[~2013-02-20 20:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-20 20:09 Raphael S.Carvalho [this message]
2013-02-20 20:31 ` [PATCH 1/1] kernel/fork.c: Simplifying a snippet of code Eric W. Biederman
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=1361390975-8831-1-git-send-email-raphael.scarv@gmail.com \
--to=raphael.scarv@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=ebiederm@xmission.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@redhat.com \
--cc=srikar@linux.vnet.ibm.com \
--cc=viro@zeniv.linux.org.uk \
/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