diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2016-09-22 14:58:37 +1000 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2016-09-22 14:58:37 +1000 |
commit | f827d68df0a1dc7e4b13967b6ae12e4fdd5cf26a (patch) | |
tree | 9ffb9a8f2ad2b342addbfd622b17579c09587c16 /fs | |
parent | b4a36b88a0f9e6242143e66122eac559e688da02 (diff) | |
parent | 549eb7b22e245064dcdc17380538718492f4ca9c (diff) |
Merge remote-tracking branch 'y2038/y2038'
Diffstat (limited to 'fs')
-rw-r--r-- | fs/afs/main.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/afs/main.c b/fs/afs/main.c index 0b187ef3b5b7..320290bfe643 100644 --- a/fs/afs/main.c +++ b/fs/afs/main.c @@ -15,6 +15,7 @@ #include <linux/completion.h> #include <linux/sched.h> #include <linux/random.h> +#include <linux/ktime.h> #include "internal.h" MODULE_DESCRIPTION("AFS Client File System"); @@ -38,7 +39,6 @@ struct workqueue_struct *afs_wq; */ static int __init afs_get_client_UUID(void) { - struct timespec ts; u64 uuidtime; u16 clockseq; int ret; @@ -49,9 +49,7 @@ static int __init afs_get_client_UUID(void) if (ret < 0) return ret; - getnstimeofday(&ts); - uuidtime = (u64) ts.tv_sec * 1000 * 1000 * 10; - uuidtime += ts.tv_nsec / 100; + uuidtime = ktime_divns(ktime_get_real(), 100); uuidtime += AFS_UUID_TO_UNIX_TIME; afs_uuid.time_low = uuidtime; afs_uuid.time_mid = uuidtime >> 32; |