diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/acct.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/kernel/acct.c b/kernel/acct.c index 065d8b4e51ef..b327f4d20104 100644 --- a/kernel/acct.c +++ b/kernel/acct.c | |||
@@ -449,8 +449,8 @@ static void do_acct_process(long exitcode, struct file *file) | |||
449 | /* calculate run_time in nsec*/ | 449 | /* calculate run_time in nsec*/ |
450 | do_posix_clock_monotonic_gettime(&uptime); | 450 | do_posix_clock_monotonic_gettime(&uptime); |
451 | run_time = (u64)uptime.tv_sec*NSEC_PER_SEC + uptime.tv_nsec; | 451 | run_time = (u64)uptime.tv_sec*NSEC_PER_SEC + uptime.tv_nsec; |
452 | run_time -= (u64)current->start_time.tv_sec*NSEC_PER_SEC | 452 | run_time -= (u64)current->group_leader->start_time.tv_sec * NSEC_PER_SEC |
453 | + current->start_time.tv_nsec; | 453 | + current->group_leader->start_time.tv_nsec; |
454 | /* convert nsec -> AHZ */ | 454 | /* convert nsec -> AHZ */ |
455 | elapsed = nsec_to_AHZ(run_time); | 455 | elapsed = nsec_to_AHZ(run_time); |
456 | #if ACCT_VERSION==3 | 456 | #if ACCT_VERSION==3 |
@@ -469,10 +469,10 @@ static void do_acct_process(long exitcode, struct file *file) | |||
469 | #endif | 469 | #endif |
470 | do_div(elapsed, AHZ); | 470 | do_div(elapsed, AHZ); |
471 | ac.ac_btime = xtime.tv_sec - elapsed; | 471 | ac.ac_btime = xtime.tv_sec - elapsed; |
472 | jiffies = cputime_to_jiffies(cputime_add(current->group_leader->utime, | 472 | jiffies = cputime_to_jiffies(cputime_add(current->utime, |
473 | current->signal->utime)); | 473 | current->signal->utime)); |
474 | ac.ac_utime = encode_comp_t(jiffies_to_AHZ(jiffies)); | 474 | ac.ac_utime = encode_comp_t(jiffies_to_AHZ(jiffies)); |
475 | jiffies = cputime_to_jiffies(cputime_add(current->group_leader->stime, | 475 | jiffies = cputime_to_jiffies(cputime_add(current->stime, |
476 | current->signal->stime)); | 476 | current->signal->stime)); |
477 | ac.ac_stime = encode_comp_t(jiffies_to_AHZ(jiffies)); | 477 | ac.ac_stime = encode_comp_t(jiffies_to_AHZ(jiffies)); |
478 | /* we really need to bite the bullet and change layout */ | 478 | /* we really need to bite the bullet and change layout */ |
@@ -522,9 +522,9 @@ static void do_acct_process(long exitcode, struct file *file) | |||
522 | ac.ac_io = encode_comp_t(0 /* current->io_usage */); /* %% */ | 522 | ac.ac_io = encode_comp_t(0 /* current->io_usage */); /* %% */ |
523 | ac.ac_rw = encode_comp_t(ac.ac_io / 1024); | 523 | ac.ac_rw = encode_comp_t(ac.ac_io / 1024); |
524 | ac.ac_minflt = encode_comp_t(current->signal->min_flt + | 524 | ac.ac_minflt = encode_comp_t(current->signal->min_flt + |
525 | current->group_leader->min_flt); | 525 | current->min_flt); |
526 | ac.ac_majflt = encode_comp_t(current->signal->maj_flt + | 526 | ac.ac_majflt = encode_comp_t(current->signal->maj_flt + |
527 | current->group_leader->maj_flt); | 527 | current->maj_flt); |
528 | ac.ac_swaps = encode_comp_t(0); | 528 | ac.ac_swaps = encode_comp_t(0); |
529 | ac.ac_exitcode = exitcode; | 529 | ac.ac_exitcode = exitcode; |
530 | 530 | ||