mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-27 11:29:36 +03:00
config: remove HAVE_XATTR_GET_DENTRY_INODE
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
e055f0e053
commit
1af510b550
@ -34,21 +34,11 @@ AC_DEFUN([ZFS_AC_KERNEL_CONST_XATTR_HANDLER], [
|
|||||||
])
|
])
|
||||||
|
|
||||||
dnl #
|
dnl #
|
||||||
dnl # Supported xattr handler get() interfaces checked newest to oldest.
|
dnl # Android API change,
|
||||||
|
dnl # The xattr_handler->get() callback was
|
||||||
|
dnl # changed to take dentry, inode and flags.
|
||||||
dnl #
|
dnl #
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_XATTR_HANDLER_GET], [
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_XATTR_HANDLER_GET_DENTRY_INODE_FLAGS], [
|
||||||
ZFS_LINUX_TEST_SRC([xattr_handler_get_dentry_inode], [
|
|
||||||
#include <linux/xattr.h>
|
|
||||||
|
|
||||||
static int get(const struct xattr_handler *handler,
|
|
||||||
struct dentry *dentry, struct inode *inode,
|
|
||||||
const char *name, void *buffer, size_t size) { return 0; }
|
|
||||||
static const struct xattr_handler
|
|
||||||
xops __attribute__ ((unused)) = {
|
|
||||||
.get = get,
|
|
||||||
};
|
|
||||||
],[])
|
|
||||||
|
|
||||||
ZFS_LINUX_TEST_SRC([xattr_handler_get_dentry_inode_flags], [
|
ZFS_LINUX_TEST_SRC([xattr_handler_get_dentry_inode_flags], [
|
||||||
#include <linux/xattr.h>
|
#include <linux/xattr.h>
|
||||||
|
|
||||||
@ -63,33 +53,16 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_XATTR_HANDLER_GET], [
|
|||||||
],[])
|
],[])
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_XATTR_HANDLER_GET], [
|
AC_DEFUN([ZFS_AC_KERNEL_XATTR_HANDLER_GET_DENTRY_INODE_FLAGS], [
|
||||||
dnl #
|
AC_MSG_RESULT(no)
|
||||||
dnl # 4.7 API change,
|
AC_MSG_CHECKING(
|
||||||
dnl # The xattr_handler->get() callback was changed to take both
|
[whether xattr_handler->get() wants dentry and inode and flags])
|
||||||
dnl # dentry and inode.
|
ZFS_LINUX_TEST_RESULT([xattr_handler_get_dentry_inode_flags], [
|
||||||
dnl #
|
|
||||||
AC_MSG_CHECKING([whether xattr_handler->get() wants dentry and inode])
|
|
||||||
ZFS_LINUX_TEST_RESULT([xattr_handler_get_dentry_inode], [
|
|
||||||
AC_MSG_RESULT(yes)
|
AC_MSG_RESULT(yes)
|
||||||
AC_DEFINE(HAVE_XATTR_GET_DENTRY_INODE, 1,
|
AC_DEFINE(HAVE_XATTR_GET_DENTRY_INODE_FLAGS, 1,
|
||||||
[xattr_handler->get() wants both dentry and inode])
|
[xattr_handler->get() wants dentry and inode and flags])
|
||||||
],[
|
],[
|
||||||
dnl #
|
|
||||||
dnl # Android API change,
|
|
||||||
dnl # The xattr_handler->get() callback was
|
|
||||||
dnl # changed to take dentry, inode and flags.
|
|
||||||
dnl #
|
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
AC_MSG_CHECKING(
|
|
||||||
[whether xattr_handler->get() wants dentry and inode and flags])
|
|
||||||
ZFS_LINUX_TEST_RESULT([xattr_handler_get_dentry_inode_flags], [
|
|
||||||
AC_MSG_RESULT(yes)
|
|
||||||
AC_DEFINE(HAVE_XATTR_GET_DENTRY_INODE_FLAGS, 1,
|
|
||||||
[xattr_handler->get() wants dentry and inode and flags])
|
|
||||||
],[
|
|
||||||
ZFS_LINUX_TEST_ERROR([xattr get()])
|
|
||||||
])
|
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
@ -211,14 +184,14 @@ AC_DEFUN([ZFS_AC_KERNEL_GENERIC_SETXATTR], [
|
|||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_XATTR], [
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_XATTR], [
|
||||||
ZFS_AC_KERNEL_SRC_CONST_XATTR_HANDLER
|
ZFS_AC_KERNEL_SRC_CONST_XATTR_HANDLER
|
||||||
ZFS_AC_KERNEL_SRC_XATTR_HANDLER_GET
|
ZFS_AC_KERNEL_SRC_XATTR_HANDLER_GET_DENTRY_INODE_FLAGS
|
||||||
ZFS_AC_KERNEL_SRC_XATTR_HANDLER_SET
|
ZFS_AC_KERNEL_SRC_XATTR_HANDLER_SET
|
||||||
ZFS_AC_KERNEL_SRC_GENERIC_SETXATTR
|
ZFS_AC_KERNEL_SRC_GENERIC_SETXATTR
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_DEFUN([ZFS_AC_KERNEL_XATTR], [
|
AC_DEFUN([ZFS_AC_KERNEL_XATTR], [
|
||||||
ZFS_AC_KERNEL_CONST_XATTR_HANDLER
|
ZFS_AC_KERNEL_CONST_XATTR_HANDLER
|
||||||
ZFS_AC_KERNEL_XATTR_HANDLER_GET
|
ZFS_AC_KERNEL_XATTR_HANDLER_GET_DENTRY_INODE_FLAGS
|
||||||
ZFS_AC_KERNEL_XATTR_HANDLER_SET
|
ZFS_AC_KERNEL_XATTR_HANDLER_SET
|
||||||
ZFS_AC_KERNEL_GENERIC_SETXATTR
|
ZFS_AC_KERNEL_GENERIC_SETXATTR
|
||||||
])
|
])
|
||||||
|
@ -47,25 +47,11 @@ fn(struct dentry *dentry) \
|
|||||||
return (!!__ ## fn(dentry->d_inode, NULL, 0, NULL, 0)); \
|
return (!!__ ## fn(dentry->d_inode, NULL, 0, NULL, 0)); \
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
#ifdef HAVE_XATTR_GET_DENTRY_INODE_FLAGS
|
||||||
* 4.7 API change,
|
|
||||||
* The xattr_handler->get() callback was changed to take a both dentry and
|
|
||||||
* inode, because the dentry might not be attached to an inode yet.
|
|
||||||
*/
|
|
||||||
#if defined(HAVE_XATTR_GET_DENTRY_INODE)
|
|
||||||
#define ZPL_XATTR_GET_WRAPPER(fn) \
|
|
||||||
static int \
|
|
||||||
fn(const struct xattr_handler *handler, struct dentry *dentry, \
|
|
||||||
struct inode *inode, const char *name, void *buffer, size_t size) \
|
|
||||||
{ \
|
|
||||||
return (__ ## fn(inode, name, buffer, size)); \
|
|
||||||
}
|
|
||||||
/*
|
/*
|
||||||
* Android API change,
|
* Android API change,
|
||||||
* The xattr_handler->get() callback was changed to take a dentry and inode
|
* The xattr_handler->get() callback also takes a flags arg.
|
||||||
* and flags, because the dentry might not be attached to an inode yet.
|
|
||||||
*/
|
*/
|
||||||
#elif defined(HAVE_XATTR_GET_DENTRY_INODE_FLAGS)
|
|
||||||
#define ZPL_XATTR_GET_WRAPPER(fn) \
|
#define ZPL_XATTR_GET_WRAPPER(fn) \
|
||||||
static int \
|
static int \
|
||||||
fn(const struct xattr_handler *handler, struct dentry *dentry, \
|
fn(const struct xattr_handler *handler, struct dentry *dentry, \
|
||||||
@ -75,7 +61,13 @@ fn(const struct xattr_handler *handler, struct dentry *dentry, \
|
|||||||
return (__ ## fn(inode, name, buffer, size)); \
|
return (__ ## fn(inode, name, buffer, size)); \
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
#error "Unsupported kernel"
|
#define ZPL_XATTR_GET_WRAPPER(fn) \
|
||||||
|
static int \
|
||||||
|
fn(const struct xattr_handler *handler, struct dentry *dentry, \
|
||||||
|
struct inode *inode, const char *name, void *buffer, size_t size) \
|
||||||
|
{ \
|
||||||
|
return (__ ## fn(inode, name, buffer, size)); \
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user