Skip to content

Commit

Permalink
[PATCH] Fix copy-and-paste error in BSD accounting
Browse files Browse the repository at this point in the history
Fix copy and paste error in jiffies_to_AHZ conversion which leads to wrong
BSD accounting information on alpha and ia64 when
CONFIG_BSD_PROCESS_ACCT_V3 is turned on.

Also update comment to match reorganised header files.

Signed-off-by: Tim Schmielau <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Tim Schmielau authored and Linus Torvalds committed Oct 15, 2005
1 parent f1ac046 commit e26148d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/linux/acct.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,13 @@ typedef struct acct acct_t;
#ifdef __KERNEL__
/*
* Yet another set of HZ to *HZ helper functions.
* See <linux/times.h> for the original.
* See <linux/jiffies.h> for the original.
*/

static inline u32 jiffies_to_AHZ(unsigned long x)
{
#if (TICK_NSEC % (NSEC_PER_SEC / AHZ)) == 0
return x / (HZ / USER_HZ);
return x / (HZ / AHZ);
#else
u64 tmp = (u64)x * TICK_NSEC;
do_div(tmp, (NSEC_PER_SEC / AHZ));
Expand Down

0 comments on commit e26148d

Please sign in to comment.