summaryrefslogtreecommitdiff
path: root/include/linux/time.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <greg@kroah.com>2004-10-18 18:03:51 -0700
committerGreg Kroah-Hartman <greg@kroah.com>2004-10-18 18:03:51 -0700
commitbffe01870598b7a0a77073e25ee94e026bc98e6b (patch)
treef5f5b65fec1239b18a4c2634807ff5d7e5729de9 /include/linux/time.h
parent23aebb6f8755121394ef088d84a7fa483b444aa9 (diff)
parenta4946826c30c56a5830326552a395c5b6afc13ef (diff)
merge
Diffstat (limited to 'include/linux/time.h')
-rw-r--r--include/linux/time.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/time.h b/include/linux/time.h
index 8bccdf73a97f..2111941c1af7 100644
--- a/include/linux/time.h
+++ b/include/linux/time.h
@@ -208,6 +208,8 @@ static inline unsigned int jiffies_to_usecs(const unsigned long j)
static inline unsigned long msecs_to_jiffies(const unsigned int m)
{
+ if (m > jiffies_to_msecs(MAX_JIFFY_OFFSET))
+ return MAX_JIFFY_OFFSET;
#if HZ <= 1000 && !(1000 % HZ)
return (m + (1000 / HZ) - 1) / (1000 / HZ);
#elif HZ > 1000 && !(HZ % 1000)