mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-17 01:51:00 +03:00
config: remove HAVE_ACL_REFCOUNT
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
6e3b863df3
commit
3008e691a2
@ -171,41 +171,14 @@ AC_DEFUN([ZFS_AC_KERNEL_INODE_OPERATIONS_SET_ACL], [
|
||||
])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # 4.16 kernel: check if struct posix_acl acl.a_refcount is a refcount_t.
|
||||
dnl # It's an atomic_t on older kernels.
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_ACL_HAS_REFCOUNT], [
|
||||
ZFS_LINUX_TEST_SRC([acl_refcount], [
|
||||
#include <linux/backing-dev.h>
|
||||
#include <linux/refcount.h>
|
||||
#include <linux/posix_acl.h>
|
||||
],[
|
||||
struct posix_acl acl;
|
||||
refcount_t *r __attribute__ ((unused)) = &acl.a_refcount;
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_KERNEL_ACL_HAS_REFCOUNT], [
|
||||
AC_MSG_CHECKING([whether posix_acl has refcount_t])
|
||||
ZFS_LINUX_TEST_RESULT([acl_refcount], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_ACL_REFCOUNT, 1, [posix_acl has refcount_t])
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_ACL], [
|
||||
ZFS_AC_KERNEL_SRC_POSIX_ACL_EQUIV_MODE_WANTS_UMODE_T
|
||||
ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_GET_ACL
|
||||
ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_SET_ACL
|
||||
ZFS_AC_KERNEL_SRC_ACL_HAS_REFCOUNT
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_KERNEL_ACL], [
|
||||
ZFS_AC_KERNEL_POSIX_ACL_EQUIV_MODE_WANTS_UMODE_T
|
||||
ZFS_AC_KERNEL_INODE_OPERATIONS_GET_ACL
|
||||
ZFS_AC_KERNEL_INODE_OPERATIONS_SET_ACL
|
||||
ZFS_AC_KERNEL_ACL_HAS_REFCOUNT
|
||||
])
|
||||
|
@ -153,13 +153,8 @@ zpl_posix_acl_release(struct posix_acl *acl)
|
||||
{
|
||||
if ((acl == NULL) || (acl == ACL_NOT_CACHED))
|
||||
return;
|
||||
#ifdef HAVE_ACL_REFCOUNT
|
||||
if (refcount_dec_and_test(&acl->a_refcount))
|
||||
zpl_posix_acl_release_impl(acl);
|
||||
#else
|
||||
if (atomic_dec_and_test(&acl->a_refcount))
|
||||
zpl_posix_acl_release_impl(acl);
|
||||
#endif
|
||||
}
|
||||
#endif /* CONFIG_FS_POSIX_ACL */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user