Commit af82eb3c authored by Frederic Weisbecker's avatar Frederic Weisbecker

posix-timers: Remove useless clock sample on timers cleanup

a0b2062b
("posix_timers: fix racy timer delta caching on task exit") forgot
to remove the arguments used for timer caching.

Fix this leftover.
Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Kosaki Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
parent a3222f88
...@@ -399,8 +399,7 @@ static int posix_cpu_timer_del(struct k_itimer *timer) ...@@ -399,8 +399,7 @@ static int posix_cpu_timer_del(struct k_itimer *timer)
return ret; return ret;
} }
static void cleanup_timers_list(struct list_head *head, static void cleanup_timers_list(struct list_head *head)
unsigned long long curr)
{ {
struct cpu_timer_list *timer, *next; struct cpu_timer_list *timer, *next;
...@@ -414,16 +413,11 @@ static void cleanup_timers_list(struct list_head *head, ...@@ -414,16 +413,11 @@ static void cleanup_timers_list(struct list_head *head,
* time for later timer_gettime calls to return. * time for later timer_gettime calls to return.
* This must be called with the siglock held. * This must be called with the siglock held.
*/ */
static void cleanup_timers(struct list_head *head, static void cleanup_timers(struct list_head *head)
cputime_t utime, cputime_t stime,
unsigned long long sum_exec_runtime)
{ {
cleanup_timers_list(head);
cputime_t ptime = utime + stime; cleanup_timers_list(++head);
cleanup_timers_list(++head);
cleanup_timers_list(head, cputime_to_expires(ptime));
cleanup_timers_list(++head, cputime_to_expires(utime));
cleanup_timers_list(++head, sum_exec_runtime);
} }
/* /*
...@@ -433,24 +427,14 @@ static void cleanup_timers(struct list_head *head, ...@@ -433,24 +427,14 @@ static void cleanup_timers(struct list_head *head,
*/ */
void posix_cpu_timers_exit(struct task_struct *tsk) void posix_cpu_timers_exit(struct task_struct *tsk)
{ {
cputime_t utime, stime;
add_device_randomness((const void*) &tsk->se.sum_exec_runtime, add_device_randomness((const void*) &tsk->se.sum_exec_runtime,
sizeof(unsigned long long)); sizeof(unsigned long long));
task_cputime(tsk, &utime, &stime); cleanup_timers(tsk->cpu_timers);
cleanup_timers(tsk->cpu_timers,
utime, stime, tsk->se.sum_exec_runtime);
} }
void posix_cpu_timers_exit_group(struct task_struct *tsk) void posix_cpu_timers_exit_group(struct task_struct *tsk)
{ {
struct signal_struct *const sig = tsk->signal; cleanup_timers(tsk->signal->cpu_timers);
cputime_t utime, stime;
task_cputime(tsk, &utime, &stime);
cleanup_timers(tsk->signal->cpu_timers,
utime + sig->utime, stime + sig->stime,
tsk->se.sum_exec_runtime + sig->sum_sched_runtime);
} }
static inline int expires_gt(cputime_t expires, cputime_t new_exp) static inline int expires_gt(cputime_t expires, cputime_t new_exp)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment