From 88c358cce181da5d738c86e90d2626a495324fae Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Sun, 4 Aug 2024 09:42:35 +1000 Subject: [PATCH] config: remove HAVE_POSIX_ACL_RELEASE and HAVE_POSIX_ACL_RELEASE_GPL_ONLY Sponsored-by: https://despairlabs.com/sponsor/ Reviewed-by: Brian Behlendorf Reviewed-by: Tony Hutter Reviewed-by: Tino Reichardt Signed-off-by: Rob Norris Closes #16479 --- config/kernel-acl.m4 | 38 ---------------------- include/os/linux/kernel/linux/vfs_compat.h | 4 --- module/os/linux/zfs/zpl_xattr.c | 5 ++- 3 files changed, 2 insertions(+), 45 deletions(-) diff --git a/config/kernel-acl.m4 b/config/kernel-acl.m4 index cb28fb2eb..dedbb844b 100644 --- a/config/kernel-acl.m4 +++ b/config/kernel-acl.m4 @@ -1,39 +1,3 @@ -dnl # -dnl # Check if posix_acl_release can be used from a ZFS_META_LICENSED -dnl # module. The is_owner_or_cap macro was replaced by -dnl # inode_owner_or_capable -dnl # -AC_DEFUN([ZFS_AC_KERNEL_SRC_POSIX_ACL_RELEASE], [ - ZFS_LINUX_TEST_SRC([posix_acl_release], [ - #include - #include - #include - ], [ - struct posix_acl *tmp = posix_acl_alloc(1, 0); - posix_acl_release(tmp); - ], [], [ZFS_META_LICENSE]) -]) - -AC_DEFUN([ZFS_AC_KERNEL_POSIX_ACL_RELEASE], [ - AC_MSG_CHECKING([whether posix_acl_release() is available]) - ZFS_LINUX_TEST_RESULT([posix_acl_release], [ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_POSIX_ACL_RELEASE, 1, - [posix_acl_release() is available]) - - AC_MSG_CHECKING([whether posix_acl_release() is GPL-only]) - ZFS_LINUX_TEST_RESULT([posix_acl_release_license], [ - AC_MSG_RESULT(no) - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_POSIX_ACL_RELEASE_GPL_ONLY, 1, - [posix_acl_release() is GPL-only]) - ]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - dnl # dnl # 3.14 API change, dnl # set_cached_acl() and forget_cached_acl() changed from inline to @@ -328,7 +292,6 @@ AC_DEFUN([ZFS_AC_KERNEL_ACL_HAS_REFCOUNT], [ ]) AC_DEFUN([ZFS_AC_KERNEL_SRC_ACL], [ - ZFS_AC_KERNEL_SRC_POSIX_ACL_RELEASE ZFS_AC_KERNEL_SRC_SET_CACHED_ACL_USABLE ZFS_AC_KERNEL_SRC_POSIX_ACL_EQUIV_MODE_WANTS_UMODE_T ZFS_AC_KERNEL_SRC_POSIX_ACL_VALID_WITH_NS @@ -339,7 +302,6 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_ACL], [ ]) AC_DEFUN([ZFS_AC_KERNEL_ACL], [ - ZFS_AC_KERNEL_POSIX_ACL_RELEASE ZFS_AC_KERNEL_SET_CACHED_ACL_USABLE ZFS_AC_KERNEL_POSIX_ACL_EQUIV_MODE_WANTS_UMODE_T ZFS_AC_KERNEL_POSIX_ACL_VALID_WITH_NS diff --git a/include/os/linux/kernel/linux/vfs_compat.h b/include/os/linux/kernel/linux/vfs_compat.h index 9f7bce424..4a5dc957c 100644 --- a/include/os/linux/kernel/linux/vfs_compat.h +++ b/include/os/linux/kernel/linux/vfs_compat.h @@ -174,9 +174,6 @@ lseek_execute( #include -#if defined(HAVE_POSIX_ACL_RELEASE) && !defined(HAVE_POSIX_ACL_RELEASE_GPL_ONLY) -#define zpl_posix_acl_release(arg) posix_acl_release(arg) -#else void zpl_posix_acl_release_impl(struct posix_acl *); static inline void @@ -192,7 +189,6 @@ zpl_posix_acl_release(struct posix_acl *acl) zpl_posix_acl_release_impl(acl); #endif } -#endif /* HAVE_POSIX_ACL_RELEASE */ #ifdef HAVE_SET_CACHED_ACL_USABLE #define zpl_set_cached_acl(ip, ty, n) set_cached_acl(ip, ty, n) diff --git a/module/os/linux/zfs/zpl_xattr.c b/module/os/linux/zfs/zpl_xattr.c index 4e4f5210f..689de19fb 100644 --- a/module/os/linux/zfs/zpl_xattr.c +++ b/module/os/linux/zfs/zpl_xattr.c @@ -1532,9 +1532,8 @@ zpl_xattr_permission(xattr_filldir_t *xf, const char *name, int name_len) return (perm); } -#if defined(CONFIG_FS_POSIX_ACL) && \ - (!defined(HAVE_POSIX_ACL_RELEASE) || \ - defined(HAVE_POSIX_ACL_RELEASE_GPL_ONLY)) +#ifdef CONFIG_FS_POSIX_ACL + struct acl_rel_struct { struct acl_rel_struct *next; struct posix_acl *acl;