diff options
Diffstat (limited to 'kernel/delayacct.c')
-rw-r--r-- | kernel/delayacct.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/delayacct.c b/kernel/delayacct.c index c0148ae992c4..81e697829633 100644 --- a/kernel/delayacct.c +++ b/kernel/delayacct.c | |||
@@ -99,9 +99,10 @@ void __delayacct_blkio_end(void) | |||
99 | int __delayacct_add_tsk(struct taskstats *d, struct task_struct *tsk) | 99 | int __delayacct_add_tsk(struct taskstats *d, struct task_struct *tsk) |
100 | { | 100 | { |
101 | s64 tmp; | 101 | s64 tmp; |
102 | struct timespec ts; | 102 | unsigned long t1; |
103 | unsigned long t1,t2,t3; | 103 | unsigned long long t2, t3; |
104 | unsigned long flags; | 104 | unsigned long flags; |
105 | struct timespec ts; | ||
105 | 106 | ||
106 | /* Though tsk->delays accessed later, early exit avoids | 107 | /* Though tsk->delays accessed later, early exit avoids |
107 | * unnecessary returning of other data | 108 | * unnecessary returning of other data |
@@ -124,11 +125,10 @@ int __delayacct_add_tsk(struct taskstats *d, struct task_struct *tsk) | |||
124 | 125 | ||
125 | d->cpu_count += t1; | 126 | d->cpu_count += t1; |
126 | 127 | ||
127 | jiffies_to_timespec(t2, &ts); | 128 | tmp = (s64)d->cpu_delay_total + t2; |
128 | tmp = (s64)d->cpu_delay_total + timespec_to_ns(&ts); | ||
129 | d->cpu_delay_total = (tmp < (s64)d->cpu_delay_total) ? 0 : tmp; | 129 | d->cpu_delay_total = (tmp < (s64)d->cpu_delay_total) ? 0 : tmp; |
130 | 130 | ||
131 | tmp = (s64)d->cpu_run_virtual_total + (s64)jiffies_to_usecs(t3) * 1000; | 131 | tmp = (s64)d->cpu_run_virtual_total + t3; |
132 | d->cpu_run_virtual_total = | 132 | d->cpu_run_virtual_total = |
133 | (tmp < (s64)d->cpu_run_virtual_total) ? 0 : tmp; | 133 | (tmp < (s64)d->cpu_run_virtual_total) ? 0 : tmp; |
134 | 134 | ||