From: Oleg Nesterov <oleg@redhat.com>
To: Veaceslav Falico <vfalico@redhat.com>
Cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman <gregkh@suse.de>,
Al Viro <viro@zeniv.linux.org.uk>,
Miloslav Trmac <mitr@redhat.com>,
James Morris <jmorris@namei.org>, Alan Cox <alan@linux.intel.com>,
Ingo Molnar <mingo@elte.hu>,
Peter Zijlstra <peterz@infradead.org>,
Andrew Morton <akpm@linux-foundation.org>,
Balbir Singh <balbir@linux.vnet.ibm.com>,
Alexey Dobriyan <adobriyan@gmail.com>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
Renaud Lottiaux <renaud.lottiaux@kerlabs.com>,
Louis Rilling <louis.rilling@kerlabs.com>,
David Howells <dhowells@redhat.com>
Subject: Re: [PATCH 2/4] copy_signal cleanup: clean acct_init_pacct() and taskstats_tgid_init()
Date: Wed, 2 Dec 2009 15:05:33 +0100 [thread overview]
Message-ID: <20091202140533.GB791@redhat.com> (raw)
In-Reply-To: <20091201221205.GB10052@darkmag.usersys.redhat.com>
On 12/01, Veaceslav Falico wrote:
>
> Remove unneeded initializations in acct_init_pacct() and taskstats_tgid_init().
> These are accessed only via copy_signal().
>
> Signed-off-by: Veaceslav Falico <vfalico@redhat.com>
> ---
>
> diff --git a/include/linux/taskstats_kern.h b/include/linux/taskstats_kern.h
> index 3398f45..d66167a 100644
> --- a/include/linux/taskstats_kern.h
> +++ b/include/linux/taskstats_kern.h
> @@ -16,7 +16,6 @@ extern struct mutex taskstats_exit_mutex;
>
> static inline void taskstats_tgid_init(struct signal_struct *sig)
> {
> - sig->stats = NULL;
> }
>
> static inline void taskstats_tgid_free(struct signal_struct *sig)
> diff --git a/kernel/acct.c b/kernel/acct.c
> index 9a4715a..8909c26 100644
> --- a/kernel/acct.c
> +++ b/kernel/acct.c
> @@ -592,8 +592,6 @@ out:
> */
> void acct_init_pacct(struct pacct_struct *pacct)
> {
> - memset(pacct, 0, sizeof(struct pacct_struct));
> - pacct->ac_utime = pacct->ac_stime = cputime_zero;
> }
Looks good imho. But please note that with this patch both
taskstats_tgid_init() and acct_init_pacct() become empty, and we
already have "empty" definitions for #ifndef case.
Perhaps it makes sense to move this (now empty) helper outside
of #ifdef, or just kill it.
Up to maintainres.
Oleg.
prev parent reply other threads:[~2009-12-02 14:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-01 22:12 [PATCH 2/4] copy_signal cleanup: clean acct_init_pacct() and taskstats_tgid_init() Veaceslav Falico
2009-12-02 14:05 ` Oleg Nesterov [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=20091202140533.GB791@redhat.com \
--to=oleg@redhat.com \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=alan@linux.intel.com \
--cc=balbir@linux.vnet.ibm.com \
--cc=dhowells@redhat.com \
--cc=gregkh@suse.de \
--cc=heiko.carstens@de.ibm.com \
--cc=jmorris@namei.org \
--cc=linux-kernel@vger.kernel.org \
--cc=louis.rilling@kerlabs.com \
--cc=mingo@elte.hu \
--cc=mitr@redhat.com \
--cc=peterz@infradead.org \
--cc=renaud.lottiaux@kerlabs.com \
--cc=vfalico@redhat.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