Skip to content

Commit e26148d

Browse files
Tim SchmielauLinus Torvalds
authored andcommitted
[PATCH] Fix copy-and-paste error in BSD accounting
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]>
1 parent f1ac046 commit e26148d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/linux/acct.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,13 +162,13 @@ typedef struct acct acct_t;
162162
#ifdef __KERNEL__
163163
/*
164164
* Yet another set of HZ to *HZ helper functions.
165-
* See <linux/times.h> for the original.
165+
* See <linux/jiffies.h> for the original.
166166
*/
167167

168168
static inline u32 jiffies_to_AHZ(unsigned long x)
169169
{
170170
#if (TICK_NSEC % (NSEC_PER_SEC / AHZ)) == 0
171-
return x / (HZ / USER_HZ);
171+
return x / (HZ / AHZ);
172172
#else
173173
u64 tmp = (u64)x * TICK_NSEC;
174174
do_div(tmp, (NSEC_PER_SEC / AHZ));

0 commit comments

Comments
 (0)