From: Andrew Morton <akpm@linux-foundation.org>
To: Zhaolei <zhaolei@cn.fujitsu.com>
Cc: linux-kernel@vger.kernel.org, Roland McGrath <roland@redhat.com>,
Oleg Nesterov <oleg@redhat.com>
Subject: Re: [PATCH] fork.c: cleanup for copy_sighand()
Date: Tue, 4 Nov 2008 15:54:55 -0800 [thread overview]
Message-ID: <20081104155455.f0b0e5b1.akpm@linux-foundation.org> (raw)
In-Reply-To: <490AC707.1060808@cn.fujitsu.com>
On Fri, 31 Oct 2008 16:51:19 +0800
Zhaolei <zhaolei@cn.fujitsu.com> wrote:
> Check CLONE_SIGHAND only is enough, because combination of CLONE_THREAD and
> CLONE_SIGHAND is already done in copy_process().
>
> Impact: cleanup, no functionality changed
>
> Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
> ---
> kernel/fork.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/kernel/fork.c b/kernel/fork.c
> index f608356..36a0dac 100644
> --- a/kernel/fork.c
> +++ b/kernel/fork.c
> @@ -741,7 +741,7 @@ static int copy_sighand(unsigned long clone_flags, struct task_struct *tsk)
> {
> struct sighand_struct *sig;
>
> - if (clone_flags & (CLONE_SIGHAND | CLONE_THREAD)) {
> + if (clone_flags & CLONE_SIGHAND) {
> atomic_inc(¤t->sighand->count);
> return 0;
> }
OK, it appears to be correct and might yield a tiny speedup on some
architectures.
But whether this change is desirable from a clarity and maintainability
point of view is unclear to me. Let's add the cc's..
prev parent reply other threads:[~2008-11-04 23:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-31 8:51 [PATCH] fork.c: cleanup for copy_sighand() Zhaolei
2008-11-04 23:54 ` Andrew Morton [this message]
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=20081104155455.f0b0e5b1.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@redhat.com \
--cc=roland@redhat.com \
--cc=zhaolei@cn.fujitsu.com \
/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.