Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754458AbZLDOas (ORCPT ); Fri, 4 Dec 2009 09:30:48 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753520AbZLDOap (ORCPT ); Fri, 4 Dec 2009 09:30:45 -0500 Received: from mx1.redhat.com ([209.132.183.28]:26997 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752755AbZLDOao (ORCPT ); Fri, 4 Dec 2009 09:30:44 -0500 Date: Fri, 4 Dec 2009 15:29:51 +0100 From: Veaceslav Falico To: Oleg Nesterov Cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Al Viro , Miloslav Trmac , James Morris , Alan Cox , Ingo Molnar , Peter Zijlstra , Andrew Morton , Balbir Singh , Alexey Dobriyan , Heiko Carstens , Renaud Lottiaux , Louis Rilling , David Howells , Stanislaw Gruszka Subject: [PATCH v2 3/4] copy_signal cleanup: clean thread_group_cputime_init() Message-ID: <20091204142951.GJ10052@darkmag.usersys.redhat.com> References: <20091201221036.GA10052@darkmag.usersys.redhat.com> <20091202135759.GA791@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20091202135759.GA791@redhat.com> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1767 Lines: 47 Remove unneeded initializations in thread_group_cputime_init() and in posix_cpu_timers_init_group(). They are useless after kmem_cache_zalloc() was used in copy_signal(). Signed-off-by: Veaceslav Falico --- diff --git a/include/linux/sched.h b/include/linux/sched.h index 75e6e60..4778ef7 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -825,17 +825,6 @@ static void posix_cpu_timers_init_group(struct signal_struct *sig) /* Thread group counters. */ thread_group_cputime_init(sig); - /* Expiration times and increments. */ - sig->it[CPUCLOCK_PROF].expires = cputime_zero; - sig->it[CPUCLOCK_PROF].incr = cputime_zero; - sig->it[CPUCLOCK_VIRT].expires = cputime_zero; - sig->it[CPUCLOCK_VIRT].incr = cputime_zero; - - /* Cached expiration times. */ - sig->cputime_expires.prof_exp = cputime_zero; - sig->cputime_expires.virt_exp = cputime_zero; - sig->cputime_expires.sched_exp = 0; - if (sig->rlim[RLIMIT_CPU].rlim_cur != RLIM_INFINITY) { sig->cputime_expires.prof_exp = secs_to_cputime(sig->rlim[RLIMIT_CPU].rlim_cur); --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -2419,9 +2419,7 @@ void thread_group_cputimer(struct task_struct *tsk, struct task_cputime *times); static inline void thread_group_cputime_init(struct signal_struct *sig) { - sig->cputimer.cputime = INIT_CPUTIME; spin_lock_init(&sig->cputimer.lock); - sig->cputimer.running = 0; } static inline void thread_group_cputime_free(struct signal_struct *sig) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/