Skip to content
This repository has been archived by the owner on Feb 26, 2020. It is now read-only.

Commit

Permalink
Linux 4.20 compat: current_kernel_time()
Browse files Browse the repository at this point in the history
Commit torvalds/linux@976516404 removed the current_kernel_time()
function (and several others).  All callers are expected to use
current_kernel_time64().  Update the gethrestime_sec() wrapper
accordingly.

Backported to SPL from zfs:82c0a050f

Reviewed-by: Olaf Faaland <faaland1@llnl.gov>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #8074
  • Loading branch information
tonyhutter committed Nov 8, 2018
1 parent a0bf47d commit cd1b28e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions include/sys/time.h
Expand Up @@ -82,8 +82,11 @@ gethrestime(inode_timespec_t *ts)
static inline time_t
gethrestime_sec(void)
{
struct timespec ts;
ts = current_kernel_time();
#if defined(HAVE_INODE_TIMESPEC64_TIMES)
inode_timespec_t ts = current_kernel_time64();
#else
inode_timespec_t ts = current_kernel_time();
#endif
return (ts.tv_sec);
}

Expand Down

0 comments on commit cd1b28e

Please sign in to comment.