diff options
author | Rob Norris <[email protected]> | 2024-08-24 20:33:08 +1000 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2024-09-18 11:23:50 -0700 |
commit | 54af0088fbc6d973984001ddc794f197eabd009d (patch) | |
tree | 1c997a53e67311a5be8e265a1a2fda4ae9c4782d | |
parent | f4c4df1638dab7f665abf72fba77418d794ff7aa (diff) |
config: remove HAVE_FILE_FADVISE
Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Reviewed-by: Tino Reichardt <[email protected]>
Signed-off-by: Rob Norris <[email protected]>
Closes #16479
-rw-r--r-- | config/kernel-fadvise.m4 | 23 | ||||
-rw-r--r-- | config/kernel.m4 | 2 | ||||
-rw-r--r-- | module/os/linux/zfs/zpl_file.c | 6 |
3 files changed, 0 insertions, 31 deletions
diff --git a/config/kernel-fadvise.m4 b/config/kernel-fadvise.m4 deleted file mode 100644 index 08912de16..000000000 --- a/config/kernel-fadvise.m4 +++ /dev/null @@ -1,23 +0,0 @@ -dnl # -dnl # Linux 4.19 API -dnl # -AC_DEFUN([ZFS_AC_KERNEL_SRC_FADVISE], [ - ZFS_LINUX_TEST_SRC([file_fadvise], [ - #include <linux/fs.h> - - static const struct file_operations - fops __attribute__ ((unused)) = { - .fadvise = NULL, - }; - ],[]) -]) - -AC_DEFUN([ZFS_AC_KERNEL_FADVISE], [ - AC_MSG_CHECKING([whether fops->fadvise() exists]) - ZFS_LINUX_TEST_RESULT([file_fadvise], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_FILE_FADVISE, 1, [fops->fadvise() exists]) - ],[ - AC_MSG_RESULT(no) - ]) -]) diff --git a/config/kernel.m4 b/config/kernel.m4 index ec6ae1e43..ef8eb8d43 100644 --- a/config/kernel.m4 +++ b/config/kernel.m4 @@ -42,7 +42,6 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_SRC], [ ZFS_AC_KERNEL_SRC_GLOBAL_PAGE_STATE ZFS_AC_KERNEL_SRC_ACCESS_OK_TYPE ZFS_AC_KERNEL_SRC_PDE_DATA - ZFS_AC_KERNEL_SRC_FADVISE ZFS_AC_KERNEL_SRC_GENERIC_FADVISE ZFS_AC_KERNEL_SRC_SCHED ZFS_AC_KERNEL_SRC_USLEEP_RANGE @@ -167,7 +166,6 @@ AC_DEFUN([ZFS_AC_KERNEL_TEST_RESULT], [ ZFS_AC_KERNEL_GLOBAL_PAGE_STATE ZFS_AC_KERNEL_OBJTOOL ZFS_AC_KERNEL_PDE_DATA - ZFS_AC_KERNEL_FADVISE ZFS_AC_KERNEL_GENERIC_FADVISE ZFS_AC_KERNEL_SCHED ZFS_AC_KERNEL_USLEEP_RANGE diff --git a/module/os/linux/zfs/zpl_file.c b/module/os/linux/zfs/zpl_file.c index 96b374ad9..25aa43416 100644 --- a/module/os/linux/zfs/zpl_file.c +++ b/module/os/linux/zfs/zpl_file.c @@ -38,9 +38,7 @@ defined(HAVE_VFS_FILEMAP_DIRTY_FOLIO) #include <linux/pagemap.h> #endif -#ifdef HAVE_FILE_FADVISE #include <linux/fadvise.h> -#endif #ifdef HAVE_VFS_FILEMAP_DIRTY_FOLIO #include <linux/writeback.h> #endif @@ -717,7 +715,6 @@ zpl_ioctl_getversion(struct file *filp, void __user *arg) return (copy_to_user(arg, &generation, sizeof (generation))); } -#ifdef HAVE_FILE_FADVISE static int zpl_fadvise(struct file *filp, loff_t offset, loff_t len, int advice) { @@ -770,7 +767,6 @@ zpl_fadvise(struct file *filp, loff_t offset, loff_t len, int advice) return (error); } -#endif /* HAVE_FILE_FADVISE */ #define ZFS_FL_USER_VISIBLE (FS_FL_USER_VISIBLE | ZFS_PROJINHERIT_FL) #define ZFS_FL_USER_MODIFIABLE (FS_FL_USER_MODIFIABLE | ZFS_PROJINHERIT_FL) @@ -1130,9 +1126,7 @@ const struct file_operations zpl_file_operations = { #ifdef HAVE_VFS_DEDUPE_FILE_RANGE .dedupe_file_range = zpl_dedupe_file_range, #endif -#ifdef HAVE_FILE_FADVISE .fadvise = zpl_fadvise, -#endif .unlocked_ioctl = zpl_ioctl, #ifdef CONFIG_COMPAT .compat_ioctl = zpl_compat_ioctl, |