Merge remote-tracking branch 'y2038/y2038'
authorStephen Rothwell <sfr@canb.auug.org.au>
Tue, 13 Sep 2016 03:23:17 +0000 (13:23 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 13 Sep 2016 03:23:17 +0000 (13:23 +1000)
fs/afs/main.c

index 0b187ef3b5b7a2909b6e07c2dd4cd57d9569789b..320290bfe643a445b1b08378c9183ef37084c492 100644 (file)
@@ -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;
This page took 0.025466 seconds and 5 git commands to generate.