From 0155b9d83130c9a3ce075996614dd9005af4e06f Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Fri, 16 Aug 2024 21:01:17 +1000 Subject: [PATCH] config: remove HAVE_FILE_AIO_FSYNC 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-aio-fsync.m4 | 23 ----------------------- config/kernel.m4 | 2 -- module/os/linux/zfs/zpl_file.c | 11 ----------- 3 files changed, 36 deletions(-) delete mode 100644 config/kernel-aio-fsync.m4 diff --git a/config/kernel-aio-fsync.m4 b/config/kernel-aio-fsync.m4 deleted file mode 100644 index b4dbf29ba..000000000 --- a/config/kernel-aio-fsync.m4 +++ /dev/null @@ -1,23 +0,0 @@ -dnl # -dnl # Linux 4.9-rc5+ ABI, removal of the .aio_fsync field -dnl # -AC_DEFUN([ZFS_AC_KERNEL_SRC_AIO_FSYNC], [ - ZFS_LINUX_TEST_SRC([aio_fsync], [ - #include - - static const struct file_operations - fops __attribute__ ((unused)) = { - .aio_fsync = NULL, - }; - ],[]) -]) - -AC_DEFUN([ZFS_AC_KERNEL_AIO_FSYNC], [ - AC_MSG_CHECKING([whether fops->aio_fsync() exists]) - ZFS_LINUX_TEST_RESULT([aio_fsync], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_FILE_AIO_FSYNC, 1, [fops->aio_fsync() exists]) - ],[ - AC_MSG_RESULT(no) - ]) -]) diff --git a/config/kernel.m4 b/config/kernel.m4 index 20893f58d..3c1e493f3 100644 --- a/config/kernel.m4 +++ b/config/kernel.m4 @@ -70,7 +70,6 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [ ZFS_AC_KERNEL_SRC_INODE_GETATTR ZFS_AC_KERNEL_SRC_INODE_SET_IVERSION ZFS_AC_KERNEL_SRC_SHOW_OPTIONS - ZFS_AC_KERNEL_SRC_AIO_FSYNC ZFS_AC_KERNEL_SRC_SHRINKER ZFS_AC_KERNEL_SRC_MKDIR ZFS_AC_KERNEL_SRC_LOOKUP_FLAGS @@ -195,7 +194,6 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [ ZFS_AC_KERNEL_INODE_GETATTR ZFS_AC_KERNEL_INODE_SET_IVERSION ZFS_AC_KERNEL_SHOW_OPTIONS - ZFS_AC_KERNEL_AIO_FSYNC ZFS_AC_KERNEL_SHRINKER ZFS_AC_KERNEL_MKDIR ZFS_AC_KERNEL_LOOKUP_FLAGS diff --git a/module/os/linux/zfs/zpl_file.c b/module/os/linux/zfs/zpl_file.c index e854834fc..96b374ad9 100644 --- a/module/os/linux/zfs/zpl_file.c +++ b/module/os/linux/zfs/zpl_file.c @@ -173,14 +173,6 @@ zpl_fsync(struct file *filp, loff_t start, loff_t end, int datasync) return (error); } -#ifdef HAVE_FILE_AIO_FSYNC -static int -zpl_aio_fsync(struct kiocb *kiocb, int datasync) -{ - return (zpl_fsync(kiocb->ki_filp, kiocb->ki_pos, -1, datasync)); -} -#endif - static inline int zfs_io_flags(struct kiocb *kiocb) { @@ -1127,9 +1119,6 @@ const struct file_operations zpl_file_operations = { #endif .mmap = zpl_mmap, .fsync = zpl_fsync, -#ifdef HAVE_FILE_AIO_FSYNC - .aio_fsync = zpl_aio_fsync, -#endif .fallocate = zpl_fallocate, .copy_file_range = zpl_copy_file_range, #ifdef HAVE_VFS_CLONE_FILE_RANGE