config: remove HAVE_VFS_FILE_OPERATIONS_EXTEND

Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de>
Signed-off-by: Rob Norris <robn@despairlabs.com>
Closes #16479
This commit is contained in:
Rob Norris
2024-08-05 19:53:26 +10:00
committed by Brian Behlendorf
parent 9914684d36
commit 230bc538cb
7 changed files with 4 additions and 86 deletions
-6
View File
@@ -2027,9 +2027,6 @@ zfs_init(void)
zfs_znode_init();
dmu_objset_register_type(DMU_OST_ZFS, zpl_get_file_info);
register_filesystem(&zpl_fs_type);
#ifdef HAVE_VFS_FILE_OPERATIONS_EXTEND
register_fo_extend(&zpl_file_operations);
#endif
}
void
@@ -2040,9 +2037,6 @@ zfs_fini(void)
*/
taskq_wait(system_delay_taskq);
taskq_wait(system_taskq);
#ifdef HAVE_VFS_FILE_OPERATIONS_EXTEND
unregister_fo_extend(&zpl_file_operations);
#endif
unregister_filesystem(&zpl_fs_type);
zfs_znode_fini();
zfsctl_fini();
-8
View File
@@ -415,11 +415,7 @@ zfs_inode_set_ops(zfsvfs_t *zfsvfs, struct inode *ip)
switch (ip->i_mode & S_IFMT) {
case S_IFREG:
ip->i_op = &zpl_inode_operations;
#ifdef HAVE_VFS_FILE_OPERATIONS_EXTEND
ip->i_fop = &zpl_file_operations.kabi_fops;
#else
ip->i_fop = &zpl_file_operations;
#endif
ip->i_mapping->a_ops = &zpl_address_space_operations;
break;
@@ -459,11 +455,7 @@ zfs_inode_set_ops(zfsvfs_t *zfsvfs, struct inode *ip)
/* Assume the inode is a file and attempt to continue */
ip->i_mode = S_IFREG | 0644;
ip->i_op = &zpl_inode_operations;
#ifdef HAVE_VFS_FILE_OPERATIONS_EXTEND
ip->i_fop = &zpl_file_operations.kabi_fops;
#else
ip->i_fop = &zpl_file_operations;
#endif
ip->i_mapping->a_ops = &zpl_address_space_operations;
break;
}
-10
View File
@@ -1126,12 +1126,7 @@ const struct address_space_operations zpl_address_space_operations = {
#endif
};
#ifdef HAVE_VFS_FILE_OPERATIONS_EXTEND
const struct file_operations_extend zpl_file_operations = {
.kabi_fops = {
#else
const struct file_operations zpl_file_operations = {
#endif
.open = zpl_open,
.release = zpl_release,
.llseek = zpl_llseek,
@@ -1170,11 +1165,6 @@ const struct file_operations zpl_file_operations = {
#ifdef CONFIG_COMPAT
.compat_ioctl = zpl_compat_ioctl,
#endif
#ifdef HAVE_VFS_FILE_OPERATIONS_EXTEND
}, /* kabi_fops */
.copy_file_range = zpl_copy_file_range,
.clone_file_range = zpl_clone_file_range,
#endif
};
const struct file_operations zpl_dir_file_operations = {
+4 -6
View File
@@ -83,8 +83,7 @@ zpl_clone_file_range_impl(struct file *src_file, loff_t src_off,
return ((ssize_t)len_o);
}
#if defined(HAVE_VFS_COPY_FILE_RANGE) || \
defined(HAVE_VFS_FILE_OPERATIONS_EXTEND)
#if defined(HAVE_VFS_COPY_FILE_RANGE)
/*
* Entry point for copy_file_range(). Copy len bytes from src_off in src_file
* to dst_off in dst_file. We are permitted to do this however we like, so we
@@ -134,7 +133,7 @@ zpl_copy_file_range(struct file *src_file, loff_t src_off,
return (ret);
}
#endif /* HAVE_VFS_COPY_FILE_RANGE || HAVE_VFS_FILE_OPERATIONS_EXTEND */
#endif /* HAVE_VFS_COPY_FILE_RANGE */
#ifdef HAVE_VFS_REMAP_FILE_RANGE
/*
@@ -179,8 +178,7 @@ zpl_remap_file_range(struct file *src_file, loff_t src_off,
}
#endif /* HAVE_VFS_REMAP_FILE_RANGE */
#if defined(HAVE_VFS_CLONE_FILE_RANGE) || \
defined(HAVE_VFS_FILE_OPERATIONS_EXTEND)
#if defined(HAVE_VFS_CLONE_FILE_RANGE)
/*
* Entry point for FICLONE and FICLONERANGE, before Linux 4.20.
*/
@@ -201,7 +199,7 @@ zpl_clone_file_range(struct file *src_file, loff_t src_off,
return (ret);
}
#endif /* HAVE_VFS_CLONE_FILE_RANGE || HAVE_VFS_FILE_OPERATIONS_EXTEND */
#endif /* HAVE_VFS_CLONE_FILE_RANGE */
#ifdef HAVE_VFS_DEDUPE_FILE_RANGE
/*