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>
This commit is contained in:
Justin Husted 2019-11-04 15:34:02 -08:00
parent 4ed889295c
commit ff695c5afb

View File

@ -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()