config: remove HAVE_XATTR_LIST_SIMPLE

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:
Rob Norris 2024-08-16 18:19:35 +10:00 committed by Brian Behlendorf
parent e6713cfd54
commit e055f0e053
3 changed files with 0 additions and 41 deletions

View File

@ -181,35 +181,6 @@ AC_DEFUN([ZFS_AC_KERNEL_XATTR_HANDLER_SET], [
])
])
dnl #
dnl # Supported xattr handler list() interfaces checked newest to oldest.
dnl #
AC_DEFUN([ZFS_AC_KERNEL_SRC_XATTR_HANDLER_LIST], [
ZFS_LINUX_TEST_SRC([xattr_handler_list_simple], [
#include <linux/xattr.h>
static bool list(struct dentry *dentry) { return 0; }
static const struct xattr_handler
xops __attribute__ ((unused)) = {
.list = list,
};
],[])
])
AC_DEFUN([ZFS_AC_KERNEL_XATTR_HANDLER_LIST], [
dnl # 4.5 API change,
dnl # The xattr_handler->list() callback was changed to take only a
dnl # dentry and it only needs to return if it's accessible.
AC_MSG_CHECKING([whether xattr_handler->list() wants simple])
ZFS_LINUX_TEST_RESULT([xattr_handler_list_simple], [
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_XATTR_LIST_SIMPLE, 1,
[xattr_handler->list() wants simple])
],[
AC_MSG_RESULT(no)
])
])
dnl #
dnl # 4.9 API change,
dnl # iops->{set,get,remove}xattr and generic_{set,get,remove}xattr are
@ -242,7 +213,6 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_XATTR], [
ZFS_AC_KERNEL_SRC_CONST_XATTR_HANDLER
ZFS_AC_KERNEL_SRC_XATTR_HANDLER_GET
ZFS_AC_KERNEL_SRC_XATTR_HANDLER_SET
ZFS_AC_KERNEL_SRC_XATTR_HANDLER_LIST
ZFS_AC_KERNEL_SRC_GENERIC_SETXATTR
])
@ -250,6 +220,5 @@ AC_DEFUN([ZFS_AC_KERNEL_XATTR], [
ZFS_AC_KERNEL_CONST_XATTR_HANDLER
ZFS_AC_KERNEL_XATTR_HANDLER_GET
ZFS_AC_KERNEL_XATTR_HANDLER_SET
ZFS_AC_KERNEL_XATTR_HANDLER_LIST
ZFS_AC_KERNEL_GENERIC_SETXATTR
])

View File

@ -40,16 +40,12 @@ typedef const struct xattr_handler xattr_handler_t;
/*
* 4.5 API change,
*/
#if defined(HAVE_XATTR_LIST_SIMPLE)
#define ZPL_XATTR_LIST_WRAPPER(fn) \
static bool \
fn(struct dentry *dentry) \
{ \
return (!!__ ## fn(dentry->d_inode, NULL, 0, NULL, 0)); \
}
#else
#error "Unsupported kernel"
#endif
/*
* 4.7 API change,

View File

@ -1363,9 +1363,7 @@ static xattr_handler_t zpl_xattr_acl_access_handler = {
.list = zpl_xattr_acl_list_access,
.get = zpl_xattr_acl_get_access,
.set = zpl_xattr_acl_set_access,
#if defined(HAVE_XATTR_LIST_SIMPLE)
.flags = ACL_TYPE_ACCESS,
#endif
};
/*
@ -1379,9 +1377,7 @@ static xattr_handler_t zpl_xattr_acl_default_handler = {
.list = zpl_xattr_acl_list_default,
.get = zpl_xattr_acl_get_default,
.set = zpl_xattr_acl_set_default,
#if defined(HAVE_XATTR_LIST_SIMPLE)
.flags = ACL_TYPE_DEFAULT,
#endif
};
#endif /* CONFIG_FS_POSIX_ACL */
@ -1446,10 +1442,8 @@ zpl_xattr_permission(xattr_filldir_t *xf, const char *name, int name_len)
}
if (handler->list) {
#if defined(HAVE_XATTR_LIST_SIMPLE)
if (!handler->list(d))
return (XAPERM_DENY);
#endif
}
return (perm);