Linux 3.4 compat, d_make_root() replaces d_alloc_root()
[zfs.git] / config / kernel-d-make-root.m4
diff --git a/config/kernel-d-make-root.m4 b/config/kernel-d-make-root.m4
new file mode 100644 (file)
index 0000000..fd2c52d
--- /dev/null
@@ -0,0 +1,12 @@
+dnl #
+dnl # 3.4.0 API change
+dnl # Added d_make_root() to replace previous d_alloc_root() function.
+dnl #
+AC_DEFUN([ZFS_AC_KERNEL_D_MAKE_ROOT], [
+       ZFS_CHECK_SYMBOL_EXPORT(
+               [d_make_root],
+               [fs/dcache.c],
+               [AC_DEFINE(HAVE_D_MAKE_ROOT, 1,
+               [d_make_root() is available])],
+               [])
+])