summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Husted <sigstop@gmail.com>2019-11-04 15:34:02 -0800
committerJustin Husted <sigstop@gmail.com>2019-11-04 21:23:46 -0800
commitff695c5afb04ed619de5ff272f6b2bb2f00c209d (patch)
tree3d22a788f8481bb70707cd609c50e0b3e4a84417
parent4ed889295cd39fa406b7ad202e3c8925cf0dc370 (diff)
Use the correct clock for userspace time.
The ktime_get_coarse_real_ts64() implementation for userspace was using CLOCK_MONOTONIC instead of CLOCK_REALTIME_COARSE. This resulted in files being timestamped with a time close to the unix epoch. Signed-off-by: Justin Husted <sigstop@gmail.com>
-rw-r--r--include/linux/sched.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 4a7f8a00..6edb06ef 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -149,7 +149,7 @@ static inline u64 ktime_get_real_seconds(void)
static inline void ktime_get_coarse_real_ts64(struct timespec64 *ts)
{
- clock_gettime(CLOCK_MONOTONIC, ts);
+ clock_gettime(CLOCK_REALTIME_COARSE, ts);
}
#define current_kernel_time64() current_kernel_time()