aboutsummaryrefslogtreecommitdiffstats
path: root/include/spl
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2018-10-31 11:50:42 -0500
committerGitHub <[email protected]>2018-10-31 11:50:42 -0500
commit82c0a050fcaa50c2d35e562858fa5c95e05caecd (patch)
treef0d50ca29c51790ca46eff335bde85380a996cf1 /include/spl
parent9042f6033a72e2ffbd4f92af7de83ad0f81f1dfc (diff)
Linux 4.20 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. Reviewed-by: Olaf Faaland <[email protected]> Reviewed-by: Tony Hutter <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #8074
Diffstat (limited to 'include/spl')
-rw-r--r--include/spl/sys/time.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/spl/sys/time.h b/include/spl/sys/time.h
index 37f5e35df..1a986c9b9 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);
}