mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-03-03 19:28:18 +03:00
config: remove HAVE_KERNEL_GET_ACL_HANDLE_CACHE
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
9629606882
commit
a40444197b
@ -199,32 +199,6 @@ AC_DEFUN([ZFS_AC_KERNEL_INODE_OPERATIONS_SET_ACL], [
|
|||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
dnl #
|
|
||||||
dnl # 4.7 API change,
|
|
||||||
dnl # The kernel get_acl will now check cache before calling i_op->get_acl and
|
|
||||||
dnl # do set_cached_acl after that, so i_op->get_acl don't need to do that
|
|
||||||
dnl # anymore.
|
|
||||||
dnl #
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_GET_ACL_HANDLE_CACHE], [
|
|
||||||
ZFS_LINUX_TEST_SRC([get_acl_handle_cache], [
|
|
||||||
#include <linux/fs.h>
|
|
||||||
],[
|
|
||||||
void *sentinel __attribute__ ((unused)) =
|
|
||||||
uncached_acl_sentinel(NULL);
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_GET_ACL_HANDLE_CACHE], [
|
|
||||||
AC_MSG_CHECKING([whether uncached_acl_sentinel() exists])
|
|
||||||
ZFS_LINUX_TEST_RESULT([get_acl_handle_cache], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_KERNEL_GET_ACL_HANDLE_CACHE, 1,
|
|
||||||
[uncached_acl_sentinel() exists])
|
|
||||||
],[
|
|
||||||
AC_MSG_RESULT(no)
|
|
||||||
])
|
|
||||||
])
|
|
||||||
|
|
||||||
dnl #
|
dnl #
|
||||||
dnl # 4.16 kernel: check if struct posix_acl acl.a_refcount is a refcount_t.
|
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 # It's an atomic_t on older kernels.
|
||||||
@ -255,7 +229,6 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_ACL], [
|
|||||||
ZFS_AC_KERNEL_SRC_POSIX_ACL_VALID_WITH_NS
|
ZFS_AC_KERNEL_SRC_POSIX_ACL_VALID_WITH_NS
|
||||||
ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_GET_ACL
|
ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_GET_ACL
|
||||||
ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_SET_ACL
|
ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_SET_ACL
|
||||||
ZFS_AC_KERNEL_SRC_GET_ACL_HANDLE_CACHE
|
|
||||||
ZFS_AC_KERNEL_SRC_ACL_HAS_REFCOUNT
|
ZFS_AC_KERNEL_SRC_ACL_HAS_REFCOUNT
|
||||||
])
|
])
|
||||||
|
|
||||||
@ -264,6 +237,5 @@ AC_DEFUN([ZFS_AC_KERNEL_ACL], [
|
|||||||
ZFS_AC_KERNEL_POSIX_ACL_VALID_WITH_NS
|
ZFS_AC_KERNEL_POSIX_ACL_VALID_WITH_NS
|
||||||
ZFS_AC_KERNEL_INODE_OPERATIONS_GET_ACL
|
ZFS_AC_KERNEL_INODE_OPERATIONS_GET_ACL
|
||||||
ZFS_AC_KERNEL_INODE_OPERATIONS_SET_ACL
|
ZFS_AC_KERNEL_INODE_OPERATIONS_SET_ACL
|
||||||
ZFS_AC_KERNEL_GET_ACL_HANDLE_CACHE
|
|
||||||
ZFS_AC_KERNEL_ACL_HAS_REFCOUNT
|
ZFS_AC_KERNEL_ACL_HAS_REFCOUNT
|
||||||
])
|
])
|
||||||
|
@ -1087,17 +1087,6 @@ zpl_get_acl_impl(struct inode *ip, int type)
|
|||||||
void *value = NULL;
|
void *value = NULL;
|
||||||
char *name;
|
char *name;
|
||||||
|
|
||||||
/*
|
|
||||||
* As of Linux 3.14, the kernel get_acl will check this for us.
|
|
||||||
* Also as of Linux 4.7, comparing against ACL_NOT_CACHED is wrong
|
|
||||||
* as the kernel get_acl will set it to temporary sentinel value.
|
|
||||||
*/
|
|
||||||
#ifndef HAVE_KERNEL_GET_ACL_HANDLE_CACHE
|
|
||||||
acl = get_cached_acl(ip, type);
|
|
||||||
if (acl != ACL_NOT_CACHED)
|
|
||||||
return (acl);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case ACL_TYPE_ACCESS:
|
case ACL_TYPE_ACCESS:
|
||||||
name = XATTR_NAME_POSIX_ACL_ACCESS;
|
name = XATTR_NAME_POSIX_ACL_ACCESS;
|
||||||
@ -1126,12 +1115,6 @@ zpl_get_acl_impl(struct inode *ip, int type)
|
|||||||
if (size > 0)
|
if (size > 0)
|
||||||
kmem_free(value, size);
|
kmem_free(value, size);
|
||||||
|
|
||||||
/* As of Linux 4.7, the kernel get_acl will set this for us */
|
|
||||||
#ifndef HAVE_KERNEL_GET_ACL_HANDLE_CACHE
|
|
||||||
if (!IS_ERR(acl))
|
|
||||||
set_cached_acl(ip, type, acl);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return (acl);
|
return (acl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user