mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-17 01:51:00 +03:00
config: remove HAVE_SET_ACL
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
3d37b1d6d4
commit
6840e3b18b
@ -147,9 +147,6 @@ AC_DEFUN([ZFS_AC_KERNEL_INODE_OPERATIONS_GET_ACL], [
|
||||
])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # 3.14 API change,
|
||||
dnl # Check if inode_operations contains the function set_acl
|
||||
dnl #
|
||||
dnl # 5.12 API change,
|
||||
dnl # set_acl() added a user_namespace* parameter first
|
||||
@ -211,30 +208,22 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_SET_ACL], [
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_KERNEL_INODE_OPERATIONS_SET_ACL], [
|
||||
AC_MSG_CHECKING([whether iops->set_acl() exists])
|
||||
AC_MSG_CHECKING([whether iops->set_acl() with 4 args exists])
|
||||
ZFS_LINUX_TEST_RESULT([inode_operations_set_acl_userns], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_SET_ACL, 1, [iops->set_acl() exists])
|
||||
AC_DEFINE(HAVE_SET_ACL_USERNS, 1, [iops->set_acl() takes 4 args])
|
||||
],[
|
||||
ZFS_LINUX_TEST_RESULT([inode_operations_set_acl_mnt_idmap_dentry], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_SET_ACL, 1, [iops->set_acl() exists])
|
||||
AC_DEFINE(HAVE_SET_ACL_IDMAP_DENTRY, 1,
|
||||
[iops->set_acl() takes 4 args, arg1 is struct mnt_idmap *])
|
||||
],[
|
||||
ZFS_LINUX_TEST_RESULT([inode_operations_set_acl_userns_dentry], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_SET_ACL, 1, [iops->set_acl() exists])
|
||||
AC_DEFINE(HAVE_SET_ACL_USERNS_DENTRY_ARG2, 1,
|
||||
[iops->set_acl() takes 4 args, arg2 is struct dentry *])
|
||||
],[
|
||||
ZFS_LINUX_TEST_RESULT([inode_operations_set_acl], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_SET_ACL, 1, [iops->set_acl() exists, takes 3 args])
|
||||
],[
|
||||
ZFS_LINUX_REQUIRE_API([i_op->set_acl()], [3.14])
|
||||
])
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
])
|
||||
])
|
||||
|
@ -69,8 +69,9 @@ extern struct file_system_type zpl_fs_type;
|
||||
extern ssize_t zpl_xattr_list(struct dentry *dentry, char *buf, size_t size);
|
||||
extern int zpl_xattr_security_init(struct inode *ip, struct inode *dip,
|
||||
const struct qstr *qstr);
|
||||
|
||||
#if defined(CONFIG_FS_POSIX_ACL)
|
||||
#if defined(HAVE_SET_ACL)
|
||||
|
||||
#if defined(HAVE_SET_ACL_IDMAP_DENTRY)
|
||||
extern int zpl_set_acl(struct mnt_idmap *idmap, struct dentry *dentry,
|
||||
struct posix_acl *acl, int type);
|
||||
@ -83,7 +84,7 @@ extern int zpl_set_acl(struct user_namespace *userns, struct dentry *dentry,
|
||||
#else
|
||||
extern int zpl_set_acl(struct inode *ip, struct posix_acl *acl, int type);
|
||||
#endif /* HAVE_SET_ACL_USERNS */
|
||||
#endif /* HAVE_SET_ACL */
|
||||
|
||||
#if defined(HAVE_GET_ACL_RCU) || defined(HAVE_GET_INODE_ACL)
|
||||
extern struct posix_acl *zpl_get_acl(struct inode *ip, int type, bool rcu);
|
||||
#elif defined(HAVE_GET_ACL)
|
||||
|
@ -807,9 +807,7 @@ const struct inode_operations zpl_inode_operations = {
|
||||
#endif
|
||||
.listxattr = zpl_xattr_list,
|
||||
#if defined(CONFIG_FS_POSIX_ACL)
|
||||
#if defined(HAVE_SET_ACL)
|
||||
.set_acl = zpl_set_acl,
|
||||
#endif /* HAVE_SET_ACL */
|
||||
#if defined(HAVE_GET_INODE_ACL)
|
||||
.get_inode_acl = zpl_get_acl,
|
||||
#else
|
||||
@ -853,9 +851,7 @@ const struct inode_operations zpl_dir_inode_operations = {
|
||||
#endif
|
||||
.listxattr = zpl_xattr_list,
|
||||
#if defined(CONFIG_FS_POSIX_ACL)
|
||||
#if defined(HAVE_SET_ACL)
|
||||
.set_acl = zpl_set_acl,
|
||||
#endif /* HAVE_SET_ACL */
|
||||
#if defined(HAVE_GET_INODE_ACL)
|
||||
.get_inode_acl = zpl_get_acl,
|
||||
#else
|
||||
@ -900,9 +896,7 @@ const struct inode_operations zpl_special_inode_operations = {
|
||||
#endif
|
||||
.listxattr = zpl_xattr_list,
|
||||
#if defined(CONFIG_FS_POSIX_ACL)
|
||||
#if defined(HAVE_SET_ACL)
|
||||
.set_acl = zpl_set_acl,
|
||||
#endif /* HAVE_SET_ACL */
|
||||
#if defined(HAVE_GET_INODE_ACL)
|
||||
.get_inode_acl = zpl_get_acl,
|
||||
#else
|
||||
|
@ -1057,7 +1057,6 @@ zpl_set_acl_impl(struct inode *ip, struct posix_acl *acl, int type)
|
||||
return (error);
|
||||
}
|
||||
|
||||
#ifdef HAVE_SET_ACL
|
||||
int
|
||||
#ifdef HAVE_SET_ACL_USERNS
|
||||
zpl_set_acl(struct user_namespace *userns, struct inode *ip,
|
||||
@ -1080,7 +1079,6 @@ zpl_set_acl(struct inode *ip, struct posix_acl *acl, int type)
|
||||
return (zpl_set_acl_impl(ip, acl, type));
|
||||
#endif /* HAVE_SET_ACL_USERNS_DENTRY_ARG2 */
|
||||
}
|
||||
#endif /* HAVE_SET_ACL */
|
||||
|
||||
static struct posix_acl *
|
||||
zpl_get_acl_impl(struct inode *ip, int type)
|
||||
|
Loading…
Reference in New Issue
Block a user