aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Norris <[email protected]>2024-08-05 19:56:01 +1000
committerBrian Behlendorf <[email protected]>2024-09-18 11:23:50 -0700
commit9a1c7240ba2e5d25aa962011c9193588d50f9013 (patch)
treecc9630857828701b170951a3b8835895eea2e281
parent230bc538cb56a2d605ca6d916cdd0a134b8a56d1 (diff)
config: remove HAVE_RENAME2_OPERATIONS_WRAPPER
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-rename.m427
-rw-r--r--include/os/linux/zfs/sys/zpl.h4
-rw-r--r--module/os/linux/zfs/zfs_znode.c5
-rw-r--r--module/os/linux/zfs/zpl_inode.c9
4 files changed, 0 insertions, 45 deletions
diff --git a/config/kernel-rename.m4 b/config/kernel-rename.m4
index ce881502d..cbb27082b 100644
--- a/config/kernel-rename.m4
+++ b/config/kernel-rename.m4
@@ -37,24 +37,6 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_RENAME], [
],[])
dnl #
- dnl # EL7 compatibility
- dnl #
- dnl # EL7 has backported renameat2 support, but it's done by defining a
- dnl # separate iops wrapper structure that takes the .renameat2 function.
- dnl #
- ZFS_LINUX_TEST_SRC([dir_inode_operations_wrapper_rename2], [
- #include <linux/fs.h>
- static int rename2_fn(struct inode *sip, struct dentry *sdp,
- struct inode *tip, struct dentry *tdp,
- unsigned int flags) { return 0; }
-
- static const struct inode_operations_wrapper
- iops __attribute__ ((unused)) = {
- .rename2 = rename2_fn,
- };
- ],[])
-
- dnl #
dnl # 5.12 API change,
dnl #
dnl # Linux 5.12 introduced passing struct user_namespace* as the first
@@ -117,15 +99,6 @@ AC_DEFUN([ZFS_AC_KERNEL_RENAME], [
[iops->rename() wants flags])
],[
AC_MSG_RESULT(no)
-
- AC_MSG_CHECKING([whether struct inode_operations_wrapper takes .rename2()])
- ZFS_LINUX_TEST_RESULT([dir_inode_operations_wrapper_rename2], [
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_RENAME2_OPERATIONS_WRAPPER, 1,
- [struct inode_operations_wrapper takes .rename2()])
- ],[
- AC_MSG_RESULT(no)
- ])
])
])
])
diff --git a/include/os/linux/zfs/sys/zpl.h b/include/os/linux/zfs/sys/zpl.h
index 9f68b3042..8a7dc0320 100644
--- a/include/os/linux/zfs/sys/zpl.h
+++ b/include/os/linux/zfs/sys/zpl.h
@@ -41,11 +41,7 @@ extern void zpl_vap_init(vattr_t *vap, struct inode *dir,
umode_t mode, cred_t *cr, zidmap_t *mnt_ns);
extern const struct inode_operations zpl_inode_operations;
-#ifdef HAVE_RENAME2_OPERATIONS_WRAPPER
-extern const struct inode_operations_wrapper zpl_dir_inode_operations;
-#else
extern const struct inode_operations zpl_dir_inode_operations;
-#endif
extern const struct inode_operations zpl_symlink_inode_operations;
extern const struct inode_operations zpl_special_inode_operations;
diff --git a/module/os/linux/zfs/zfs_znode.c b/module/os/linux/zfs/zfs_znode.c
index bc01faed1..7f031d16f 100644
--- a/module/os/linux/zfs/zfs_znode.c
+++ b/module/os/linux/zfs/zfs_znode.c
@@ -420,12 +420,7 @@ zfs_inode_set_ops(zfsvfs_t *zfsvfs, struct inode *ip)
break;
case S_IFDIR:
-#ifdef HAVE_RENAME2_OPERATIONS_WRAPPER
- ip->i_flags |= S_IOPS_WRAPPER;
- ip->i_op = &zpl_dir_inode_operations.ops;
-#else
ip->i_op = &zpl_dir_inode_operations;
-#endif
ip->i_fop = &zpl_dir_file_operations;
ITOZ(ip)->z_zn_prefetch = B_TRUE;
break;
diff --git a/module/os/linux/zfs/zpl_inode.c b/module/os/linux/zfs/zpl_inode.c
index dfaaa6f1e..863e439f4 100644
--- a/module/os/linux/zfs/zpl_inode.c
+++ b/module/os/linux/zfs/zpl_inode.c
@@ -792,12 +792,7 @@ const struct inode_operations zpl_inode_operations = {
#endif /* CONFIG_FS_POSIX_ACL */
};
-#ifdef HAVE_RENAME2_OPERATIONS_WRAPPER
-const struct inode_operations_wrapper zpl_dir_inode_operations = {
- .ops = {
-#else
const struct inode_operations zpl_dir_inode_operations = {
-#endif
.create = zpl_create,
.lookup = zpl_lookup,
.link = zpl_link,
@@ -834,10 +829,6 @@ const struct inode_operations zpl_dir_inode_operations = {
.get_acl = zpl_get_acl,
#endif /* HAVE_GET_INODE_ACL */
#endif /* CONFIG_FS_POSIX_ACL */
-#ifdef HAVE_RENAME2_OPERATIONS_WRAPPER
- },
- .rename2 = zpl_rename2,
-#endif
};
const struct inode_operations zpl_symlink_inode_operations = {