aboutsummaryrefslogtreecommitdiffstats
path: root/config/kernel-acl.m4
diff options
context:
space:
mode:
authorRich Ercolani <[email protected]>2021-05-27 11:55:49 -0400
committerBrian Behlendorf <[email protected]>2021-05-27 22:31:57 -0700
commit57e3b9c3ccf08b199784b1f5a9514deebbbc9e6d (patch)
tree1519fcff5582e7e77931cb82f94d600b908d4fa8 /config/kernel-acl.m4
parent605b901ca6ea52db0e5c9fd531eddfb811c0027b (diff)
Bend zpl_set_acl to permit the new userns* parameter
Just like #12087, the set_acl signature changed with all the bolted-on *userns parameters, which disabled set_acl usage, and caused #12076. Turn zpl_set_acl into zpl_set_acl and zpl_set_acl_impl, and add a new configure test for the new version. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Rich Ercolani <[email protected]> Closes #12076 Closes #12093
Diffstat (limited to 'config/kernel-acl.m4')
-rw-r--r--config/kernel-acl.m425
1 files changed, 23 insertions, 2 deletions
diff --git a/config/kernel-acl.m4 b/config/kernel-acl.m4
index e02ce6653..c6da4df24 100644
--- a/config/kernel-acl.m4
+++ b/config/kernel-acl.m4
@@ -189,7 +189,22 @@ dnl #
dnl # 3.14 API change,
dnl # Check if inode_operations contains the function set_acl
dnl #
+dnl # 5.12 API change,
+dnl # set_acl() added a user_namespace* parameter first
+dnl #
AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_SET_ACL], [
+ ZFS_LINUX_TEST_SRC([inode_operations_set_acl_userns], [
+ #include <linux/fs.h>
+
+ int set_acl_fn(struct user_namespace *userns,
+ struct inode *inode, struct posix_acl *acl,
+ int type) { return 0; }
+
+ static const struct inode_operations
+ iops __attribute__ ((unused)) = {
+ .set_acl = set_acl_fn,
+ };
+ ],[])
ZFS_LINUX_TEST_SRC([inode_operations_set_acl], [
#include <linux/fs.h>
@@ -205,11 +220,17 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_SET_ACL], [
AC_DEFUN([ZFS_AC_KERNEL_INODE_OPERATIONS_SET_ACL], [
AC_MSG_CHECKING([whether iops->set_acl() exists])
- ZFS_LINUX_TEST_RESULT([inode_operations_set_acl], [
+ ZFS_LINUX_TEST_RESULT([inode_operations_set_acl_userns], [
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_SET_ACL, 1, [iops->set_acl() exists])
+ AC_DEFINE(HAVE_SET_ACL_USERNS, 1, [iops->set_acl() takes 4 args])
],[
- AC_MSG_RESULT(no)
+ ZFS_LINUX_TEST_RESULT([inode_operations_set_acl], [
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_SET_ACL, 1, [iops->set_acl() exists, takes 3 args])
+ ],[
+ AC_MSG_RESULT(no)
+ ])
])
])