Commit 8bde3aa9 authored by Stephen Rothwell's avatar Stephen Rothwell Committed by Linus Torvalds

[PATCH] better compat_jiffies_to_clock_t

By a suggestion from David Mosberger: use this new version of
compat_jiffies_to_clock_t, which is more appropriate on 64-bit hosts
that don't have overflow issues.

It does better rounding and will not fail if COMPAT_USER_HZ > HZ.
parent 50b6a4a5
......@@ -9,9 +9,11 @@
#ifdef CONFIG_COMPAT
#include <linux/stat.h>
#include <linux/param.h> /* for HZ */
#include <asm/compat.h>
#define compat_jiffies_to_clock_t(x) ((x) / (HZ / COMPAT_USER_HZ))
#define compat_jiffies_to_clock_t(x) \
(((unsigned long)(x) * COMPAT_USER_HZ) / HZ)
struct compat_utimbuf {
compat_time_t actime;
......
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