File zfs-4.20.patch of Package zfs

From 8501452bc2054ab51d65b6443b74f4766611844d Mon Sep 17 00:00:00 2001
From: Brian Behlendorf <behlendorf1@llnl.gov>
Date: Tue, 30 Oct 2018 14:04:36 -0700
Subject: [PATCH] Linux 4.19 compat: current_kernel_time()

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.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
---
 include/spl/sys/time.h | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/include/spl/sys/time.h b/include/spl/sys/time.h
index 37f5e35df2a..1a986c9b97c 100644
--- a/include/spl/sys/time.h
+++ b/include/spl/sys/time.h
@@ -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);
 }