lkml.org 
[lkml]   [2009]   [Dec]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 2/4] copy_signal cleanup: clean acct_init_pacct() and taskstats_tgid_init()
On 12/04, Veaceslav Falico wrote:
>
> Remove unneeded initializations in acct_init_pacct() and taskstats_tgid_init().
> These are accessed only via copy_signal() and are useless after using
> kmem_cache_zalloc() in 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 to me, but I'd suggest you to send the next patch (on top
of this) which kills both these helpers. Otherwise we have empty
definitions with and without CONFIG_TASKSTATS, a bit strange.

Oleg.



\
 
 \ /
  Last update: 2009-12-05 17:43    [W:0.100 / U:1.652 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site