diff options
author | Justin Husted <sigstop@gmail.com> | 2019-11-04 15:34:02 -0800 |
---|---|---|
committer | Justin Husted <sigstop@gmail.com> | 2019-11-04 21:23:46 -0800 |
commit | ff695c5afb04ed619de5ff272f6b2bb2f00c209d (patch) | |
tree | 3d22a788f8481bb70707cd609c50e0b3e4a84417 | |
parent | 4ed889295cd39fa406b7ad202e3c8925cf0dc370 (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.h | 2 |
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() |