Commit 93c59907c6f247d09239135caecf294a106a2ae0
Committed by
Linus Torvalds
1 parent
4dd66e69d4
copy_signal() cleanup: clean thread_group_cputime_init()
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 <vfalico@redhat.com> Acked-by: Oleg Nesterov <oleg@redhat.com> Cc: Roland McGrath <roland@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 2 changed files with 0 additions and 13 deletions Side-by-side Diff
include/linux/sched.h
... | ... | @@ -2391,9 +2391,7 @@ |
2391 | 2391 | |
2392 | 2392 | static inline void thread_group_cputime_init(struct signal_struct *sig) |
2393 | 2393 | { |
2394 | - sig->cputimer.cputime = INIT_CPUTIME; | |
2395 | 2394 | spin_lock_init(&sig->cputimer.lock); |
2396 | - sig->cputimer.running = 0; | |
2397 | 2395 | } |
2398 | 2396 | |
2399 | 2397 | static inline void thread_group_cputime_free(struct signal_struct *sig) |
kernel/fork.c
... | ... | @@ -833,17 +833,6 @@ |
833 | 833 | /* Thread group counters. */ |
834 | 834 | thread_group_cputime_init(sig); |
835 | 835 | |
836 | - /* Expiration times and increments. */ | |
837 | - sig->it[CPUCLOCK_PROF].expires = cputime_zero; | |
838 | - sig->it[CPUCLOCK_PROF].incr = cputime_zero; | |
839 | - sig->it[CPUCLOCK_VIRT].expires = cputime_zero; | |
840 | - sig->it[CPUCLOCK_VIRT].incr = cputime_zero; | |
841 | - | |
842 | - /* Cached expiration times. */ | |
843 | - sig->cputime_expires.prof_exp = cputime_zero; | |
844 | - sig->cputime_expires.virt_exp = cputime_zero; | |
845 | - sig->cputime_expires.sched_exp = 0; | |
846 | - | |
847 | 836 | cpu_limit = ACCESS_ONCE(sig->rlim[RLIMIT_CPU].rlim_cur); |
848 | 837 | if (cpu_limit != RLIM_INFINITY) { |
849 | 838 | sig->cputime_expires.prof_exp = secs_to_cputime(cpu_limit); |