mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-01-31 04:14:21 +03:00
config: remove HAVE_RENAME2_OPERATIONS_WRAPPER
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:
parent
49f449c865
commit
f5a1abcafa
@ -36,24 +36,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 #
|
||||||
dnl # 5.12 API change,
|
dnl # 5.12 API change,
|
||||||
dnl #
|
dnl #
|
||||||
@ -115,14 +97,6 @@ AC_DEFUN([ZFS_AC_KERNEL_RENAME], [
|
|||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
AC_DEFINE(HAVE_RENAME_WANTS_FLAGS, 1,
|
AC_DEFINE(HAVE_RENAME_WANTS_FLAGS, 1,
|
||||||
[iops->rename() wants flags])
|
[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)
|
AC_MSG_RESULT(no)
|
||||||
])
|
])
|
||||||
@ -130,4 +104,3 @@ AC_DEFUN([ZFS_AC_KERNEL_RENAME], [
|
|||||||
])
|
])
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
])
|
|
||||||
|
@ -42,11 +42,7 @@ extern void zpl_vap_init(vattr_t *vap, struct inode *dir,
|
|||||||
umode_t mode, cred_t *cr, zidmap_t *mnt_ns);
|
umode_t mode, cred_t *cr, zidmap_t *mnt_ns);
|
||||||
|
|
||||||
extern const struct inode_operations zpl_inode_operations;
|
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;
|
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_symlink_inode_operations;
|
||||||
extern const struct inode_operations zpl_special_inode_operations;
|
extern const struct inode_operations zpl_special_inode_operations;
|
||||||
|
|
||||||
|
@ -420,12 +420,7 @@ zfs_inode_set_ops(zfsvfs_t *zfsvfs, struct inode *ip)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case S_IFDIR:
|
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;
|
ip->i_op = &zpl_dir_inode_operations;
|
||||||
#endif
|
|
||||||
ip->i_fop = &zpl_dir_file_operations;
|
ip->i_fop = &zpl_dir_file_operations;
|
||||||
ITOZ(ip)->z_zn_prefetch = B_TRUE;
|
ITOZ(ip)->z_zn_prefetch = B_TRUE;
|
||||||
break;
|
break;
|
||||||
|
@ -792,12 +792,7 @@ const struct inode_operations zpl_inode_operations = {
|
|||||||
#endif /* CONFIG_FS_POSIX_ACL */
|
#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 = {
|
const struct inode_operations zpl_dir_inode_operations = {
|
||||||
#endif
|
|
||||||
.create = zpl_create,
|
.create = zpl_create,
|
||||||
.lookup = zpl_lookup,
|
.lookup = zpl_lookup,
|
||||||
.link = zpl_link,
|
.link = zpl_link,
|
||||||
@ -834,10 +829,6 @@ const struct inode_operations zpl_dir_inode_operations = {
|
|||||||
.get_acl = zpl_get_acl,
|
.get_acl = zpl_get_acl,
|
||||||
#endif /* HAVE_GET_INODE_ACL */
|
#endif /* HAVE_GET_INODE_ACL */
|
||||||
#endif /* CONFIG_FS_POSIX_ACL */
|
#endif /* CONFIG_FS_POSIX_ACL */
|
||||||
#ifdef HAVE_RENAME2_OPERATIONS_WRAPPER
|
|
||||||
},
|
|
||||||
.rename2 = zpl_rename2,
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct inode_operations zpl_symlink_inode_operations = {
|
const struct inode_operations zpl_symlink_inode_operations = {
|
||||||
|
Loading…
Reference in New Issue
Block a user