summaryrefslogtreecommitdiffstats
path: root/config/kernel-generic_fillattr.m4
diff options
context:
space:
mode:
Diffstat (limited to 'config/kernel-generic_fillattr.m4')
-rw-r--r--config/kernel-generic_fillattr.m428
1 files changed, 28 insertions, 0 deletions
diff --git a/config/kernel-generic_fillattr.m4 b/config/kernel-generic_fillattr.m4
new file mode 100644
index 000000000..50c803130
--- /dev/null
+++ b/config/kernel-generic_fillattr.m4
@@ -0,0 +1,28 @@
+dnl #
+dnl # 5.12 API
+dnl #
+dnl # generic_fillattr in linux/fs.h now requires a struct user_namespace*
+dnl # as the first arg, to support idmapped mounts.
+dnl #
+AC_DEFUN([ZFS_AC_KERNEL_SRC_GENERIC_FILLATTR_USERNS], [
+ ZFS_LINUX_TEST_SRC([generic_fillattr_userns], [
+ #include <linux/fs.h>
+ ],[
+ struct user_namespace *userns = NULL;
+ struct inode *in = NULL;
+ struct kstat *k = NULL;
+ generic_fillattr(userns, in, k);
+ ])
+])
+
+AC_DEFUN([ZFS_AC_KERNEL_GENERIC_FILLATTR_USERNS], [
+ AC_MSG_CHECKING([whether generic_fillattr requres struct user_namespace*])
+ ZFS_LINUX_TEST_RESULT([generic_fillattr_userns], [
+ AC_MSG_RESULT([yes])
+ AC_DEFINE(HAVE_GENERIC_FILLATTR_USERNS, 1,
+ [generic_fillattr requires struct user_namespace*])
+ ],[
+ AC_MSG_RESULT([no])
+ ])
+])
+