mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Linux 5.15 compat: get_acl()
Kernel commits 332f606b32b6 ovl: enable RCU'd ->get_acl() 0cad6246621b vfs: add rcu argument to ->get_acl() callback Added compatibility code to detect the new ->get_acl() interface and correctly handle the case where the new rcu argument is set. Reviewed-by: Coleman Kane <ckane@colemankane.org> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #12548
This commit is contained in:
committed by
Tony Hutter
parent
72d16a9b49
commit
7a41ef240a
+22
-1
@@ -162,6 +162,9 @@ dnl #
|
||||
dnl # 3.1 API change,
|
||||
dnl # Check if inode_operations contains the function get_acl
|
||||
dnl #
|
||||
dnl # 5.15 API change,
|
||||
dnl # Added the bool rcu argument to get_acl for rcu path walk.
|
||||
dnl #
|
||||
AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_GET_ACL], [
|
||||
ZFS_LINUX_TEST_SRC([inode_operations_get_acl], [
|
||||
#include <linux/fs.h>
|
||||
@@ -174,14 +177,32 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_GET_ACL], [
|
||||
.get_acl = get_acl_fn,
|
||||
};
|
||||
],[])
|
||||
|
||||
ZFS_LINUX_TEST_SRC([inode_operations_get_acl_rcu], [
|
||||
#include <linux/fs.h>
|
||||
|
||||
struct posix_acl *get_acl_fn(struct inode *inode, int type,
|
||||
bool rcu) { return NULL; }
|
||||
|
||||
static const struct inode_operations
|
||||
iops __attribute__ ((unused)) = {
|
||||
.get_acl = get_acl_fn,
|
||||
};
|
||||
],[])
|
||||
])
|
||||
|
||||
AC_DEFUN([ZFS_AC_KERNEL_INODE_OPERATIONS_GET_ACL], [
|
||||
AC_MSG_CHECKING([whether iops->get_acl() exists])
|
||||
ZFS_LINUX_TEST_RESULT([inode_operations_get_acl], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_GET_ACL, 1, [iops->get_acl() exists])
|
||||
],[
|
||||
ZFS_LINUX_TEST_ERROR([iops->get_acl()])
|
||||
ZFS_LINUX_TEST_RESULT([inode_operations_get_acl_rcu], [
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(HAVE_GET_ACL_RCU, 1, [iops->get_acl() takes rcu])
|
||||
],[
|
||||
ZFS_LINUX_TEST_ERROR([iops->get_acl()])
|
||||
])
|
||||
])
|
||||
])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user