]> git.proxmox.com Git - mirror_zfs.git/commitdiff
config: remove HAVE_SET_ACL
authorRob Norris <robn@despairlabs.com>
Sat, 3 Aug 2024 23:47:34 +0000 (09:47 +1000)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 18 Sep 2024 18:23:50 +0000 (11:23 -0700)
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

config/kernel-acl.m4
include/os/linux/zfs/sys/zpl.h
module/os/linux/zfs/zpl_inode.c
module/os/linux/zfs/zpl_xattr.c

index dedbb844baf62763e0582c13149ab48a7d27fde9..54c9401dfcb4088dfd66f483a16e38672b769f9c 100644 (file)
@@ -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)
                        ])
                ])
        ])
index c8eefe4fe5dafa8c729f2bcdb09e384e13286cd5..699b69943c067eb1f269173944b54e03d3a8038e 100644 (file)
@@ -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)
index ad1753f7a071065a8f9a91853052f5d263391bdd..059f74786625796089a4f3706399a4f03e2b6b51 100644 (file)
@@ -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
index 689de19fbe184c780cedbec2d82a3f7d145aadd0..a1a7396c0833aeb00b1b45d94f4fde6d84e5f758 100644 (file)
@@ -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)