aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/kernel-super-userns.m421
-rw-r--r--config/kernel.m41
2 files changed, 22 insertions, 0 deletions
diff --git a/config/kernel-super-userns.m4 b/config/kernel-super-userns.m4
new file mode 100644
index 000000000..de94ad967
--- /dev/null
+++ b/config/kernel-super-userns.m4
@@ -0,0 +1,21 @@
+dnl #
+dnl # 4.8 API change
+dnl # struct user_namespace was added to struct super_block as
+dnl # super->s_user_ns member
+dnl #
+AC_DEFUN([ZFS_AC_KERNEL_SUPER_USER_NS], [
+ AC_MSG_CHECKING([whether super_block->s_user_ns exists])
+ ZFS_LINUX_TRY_COMPILE([
+ #include <linux/fs.h>
+ #include <linux/user_namespace.h>
+ ],[
+ struct super_block super;
+ super.s_user_ns = (struct user_namespace *)NULL;
+ ],[
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_SUPER_USER_NS, 1,
+ [super_block->s_user_ns exists])
+ ],[
+ AC_MSG_RESULT(no)
+ ])
+])
diff --git a/config/kernel.m4 b/config/kernel.m4
index 7edafee0f..2fa04706b 100644
--- a/config/kernel.m4
+++ b/config/kernel.m4
@@ -8,6 +8,7 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [
ZFS_AC_KERNEL_CONFIG
ZFS_AC_KERNEL_DECLARE_EVENT_CLASS
ZFS_AC_KERNEL_CURRENT_BIO_TAIL
+ ZFS_AC_KERNEL_SUPER_USER_NS
ZFS_AC_KERNEL_SUBMIT_BIO
ZFS_AC_KERNEL_BDEV_BLOCK_DEVICE_OPERATIONS
ZFS_AC_KERNEL_BLOCK_DEVICE_OPERATIONS_RELEASE_VOID