aboutsummaryrefslogtreecommitdiffstats
path: root/config/kernel-lookup-bdev.m4
diff options
context:
space:
mode:
Diffstat (limited to 'config/kernel-lookup-bdev.m4')
-rw-r--r--config/kernel-lookup-bdev.m422
1 files changed, 17 insertions, 5 deletions
diff --git a/config/kernel-lookup-bdev.m4 b/config/kernel-lookup-bdev.m4
index 245f95f04..abbf55d9b 100644
--- a/config/kernel-lookup-bdev.m4
+++ b/config/kernel-lookup-bdev.m4
@@ -1,17 +1,29 @@
dnl #
-dnl # 2.6.27 API change
-dnl # lookup_bdev() was exported.
+dnl # 2.6.27, lookup_bdev() was exported.
+dnl # 4.4.0-6.21 - x.y on Ubuntu, lookup_bdev() takes 2 arguments.
dnl #
AC_DEFUN([ZFS_AC_KERNEL_LOOKUP_BDEV],
- [AC_MSG_CHECKING([whether lookup_bdev() is available])
+ [AC_MSG_CHECKING([whether lookup_bdev() wants 1 arg])
ZFS_LINUX_TRY_COMPILE_SYMBOL([
#include <linux/fs.h>
], [
lookup_bdev(NULL);
], [lookup_bdev], [fs/block_dev.c], [
AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_LOOKUP_BDEV, 1, [lookup_bdev() is available])
+ AC_DEFINE(HAVE_1ARG_LOOKUP_BDEV, 1, [lookup_bdev() wants 1 arg])
], [
AC_MSG_RESULT(no)
+ AC_MSG_CHECKING([whether lookup_bdev() wants 2 args])
+ ZFS_LINUX_TRY_COMPILE_SYMBOL([
+ #include <linux/fs.h>
+ ], [
+ lookup_bdev(NULL, FMODE_READ);
+ ], [lookup_bdev], [fs/block_dev.c], [
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_2ARGS_LOOKUP_BDEV, 1,
+ [lookup_bdev() wants 2 args])
+ ], [
+ AC_MSG_RESULT(no)
+ ])
])
-])
+]) \ No newline at end of file