aboutsummaryrefslogtreecommitdiff
path: root/config/kernel-is_owner_or_cap.m4
diff options
context:
space:
mode:
Diffstat (limited to 'config/kernel-is_owner_or_cap.m4')
-rw-r--r--config/kernel-is_owner_or_cap.m423
1 files changed, 21 insertions, 2 deletions
diff --git a/config/kernel-is_owner_or_cap.m4 b/config/kernel-is_owner_or_cap.m4
index 3df6163da270..3c3c6ad2240f 100644
--- a/config/kernel-is_owner_or_cap.m4
+++ b/config/kernel-is_owner_or_cap.m4
@@ -11,13 +11,32 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_OWNER_OR_CAPABLE], [
struct inode *ip = NULL;
(void) inode_owner_or_capable(ip);
])
+
+ ZFS_LINUX_TEST_SRC([inode_owner_or_capable_idmapped], [
+ #include <linux/fs.h>
+ ],[
+ struct inode *ip = NULL;
+ (void) inode_owner_or_capable(&init_user_ns, ip);
+ ])
])
AC_DEFUN([ZFS_AC_KERNEL_INODE_OWNER_OR_CAPABLE], [
AC_MSG_CHECKING([whether inode_owner_or_capable() exists])
ZFS_LINUX_TEST_RESULT([inode_owner_or_capable], [
AC_MSG_RESULT(yes)
- ],[
- ZFS_LINUX_TEST_ERROR([capability])
+ AC_DEFINE(HAVE_INODE_OWNER_OR_CAPABLE, 1,
+ [inode_owner_or_capable() exists])
+ ], [
+ AC_MSG_RESULT(no)
+
+ AC_MSG_CHECKING(
+ [whether inode_owner_or_capable() takes user_ns])
+ ZFS_LINUX_TEST_RESULT([inode_owner_or_capable_idmapped], [
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_INODE_OWNER_OR_CAPABLE_IDMAPPED, 1,
+ [inode_owner_or_capable() takes user_ns])
+ ],[
+ ZFS_LINUX_TEST_ERROR([capability])
+ ])
])
])