From 5d537c76601025e9fa8ac1d168aeaaefcd2ea479 Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Fri, 16 Aug 2024 16:50:01 +1000 Subject: [PATCH] config: remove HAVE_CURRENT_TIME Sponsored-by: https://despairlabs.com/sponsor/ Reviewed-by: Brian Behlendorf Reviewed-by: Tony Hutter Reviewed-by: Tino Reichardt Signed-off-by: Rob Norris Closes #16479 --- config/kernel-current-time.m4 | 26 ---------------------- config/kernel.m4 | 2 -- include/os/linux/kernel/linux/vfs_compat.h | 12 ---------- 3 files changed, 40 deletions(-) delete mode 100644 config/kernel-current-time.m4 diff --git a/config/kernel-current-time.m4 b/config/kernel-current-time.m4 deleted file mode 100644 index ab7d9c5ce..000000000 --- a/config/kernel-current-time.m4 +++ /dev/null @@ -1,26 +0,0 @@ -dnl # -dnl # 4.9, current_time() added -dnl # 4.18, return type changed from timespec to timespec64 -dnl # -dnl # Note that we don't care about the return type in this check. If we have -dnl # to implement a fallback, we'll know we're <4.9, which was timespec. -dnl # -AC_DEFUN([ZFS_AC_KERNEL_SRC_CURRENT_TIME], [ - ZFS_LINUX_TEST_SRC([current_time], [ - #include - ], [ - struct inode ip __attribute__ ((unused)); - (void) current_time(&ip); - ]) -]) - -AC_DEFUN([ZFS_AC_KERNEL_CURRENT_TIME], [ - AC_MSG_CHECKING([whether current_time() exists]) - ZFS_LINUX_TEST_RESULT_SYMBOL([current_time], - [current_time], [fs/inode.c], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_CURRENT_TIME, 1, [current_time() exists]) - ], [ - AC_MSG_RESULT(no) - ]) -]) diff --git a/config/kernel.m4 b/config/kernel.m4 index ae3ca7a60..179f4ff4d 100644 --- a/config/kernel.m4 +++ b/config/kernel.m4 @@ -117,7 +117,6 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [ ZFS_AC_KERNEL_SRC_KUIDGID_T ZFS_AC_KERNEL_SRC_KUID_HELPERS ZFS_AC_KERNEL_SRC_RENAME - ZFS_AC_KERNEL_SRC_CURRENT_TIME ZFS_AC_KERNEL_SRC_USERNS_CAPABILITIES ZFS_AC_KERNEL_SRC_IN_COMPAT_SYSCALL ZFS_AC_KERNEL_SRC_KTIME @@ -251,7 +250,6 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [ ZFS_AC_KERNEL_KUIDGID_T ZFS_AC_KERNEL_KUID_HELPERS ZFS_AC_KERNEL_RENAME - ZFS_AC_KERNEL_CURRENT_TIME ZFS_AC_KERNEL_USERNS_CAPABILITIES ZFS_AC_KERNEL_IN_COMPAT_SYSCALL ZFS_AC_KERNEL_KTIME diff --git a/include/os/linux/kernel/linux/vfs_compat.h b/include/os/linux/kernel/linux/vfs_compat.h index 3a7a190e5..e55c216ac 100644 --- a/include/os/linux/kernel/linux/vfs_compat.h +++ b/include/os/linux/kernel/linux/vfs_compat.h @@ -291,18 +291,6 @@ func(struct mnt_idmap *user_ns, const struct path *path, \ #error #endif -/* - * 4.9 API change - * Preferred interface to get the current FS time. - */ -#if !defined(HAVE_CURRENT_TIME) -static inline struct timespec -current_time(struct inode *ip) -{ - return (timespec_trunc(current_kernel_time(), ip->i_sb->s_time_gran)); -} -#endif - /* * 4.16 API change * Added iversion interface for managing inode version field.