Fix false ENOENT on snapshot control dentries
[zfs.git] / config / kernel.m4
index 34969c3..58a8080 100644 (file)
@@ -47,6 +47,7 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [
        ZFS_AC_KERNEL_SHOW_OPTIONS
        ZFS_AC_KERNEL_FSYNC
        ZFS_AC_KERNEL_EVICT_INODE
+       ZFS_AC_KERNEL_DIRTY_INODE_WITH_FLAGS
        ZFS_AC_KERNEL_NR_CACHED_OBJECTS
        ZFS_AC_KERNEL_FREE_CACHED_OBJECTS
        ZFS_AC_KERNEL_FALLOCATE
@@ -61,6 +62,9 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [
        ZFS_AC_KERNEL_INSERT_INODE_LOCKED
        ZFS_AC_KERNEL_D_MAKE_ROOT
        ZFS_AC_KERNEL_D_OBTAIN_ALIAS
+       ZFS_AC_KERNEL_D_SET_D_OP
+       ZFS_AC_KERNEL_D_REVALIDATE_NAMEIDATA
+       ZFS_AC_KERNEL_CONST_DENTRY_OPERATIONS
        ZFS_AC_KERNEL_CHECK_DISK_SIZE_CHANGE
        ZFS_AC_KERNEL_TRUNCATE_SETSIZE
        ZFS_AC_KERNEL_6ARGS_SECURITY_INODE_INIT_SECURITY
@@ -146,11 +150,7 @@ AC_DEFUN([ZFS_AC_KERNEL], [
                AS_IF([test -n "$sourcelink" && test -e ${sourcelink}], [
                        kernelsrc=`readlink -f ${sourcelink}`
                ], [
-                       AC_MSG_RESULT([Not found])
-                       AC_MSG_ERROR([
-       *** Please make sure the kernel devel package for your distribution
-       *** is installed then try again.  If that fails you can specify the
-       *** location of the kernel source with the '--with-linux=PATH' option.])
+                       kernelsrc="[Not found]"
                ])
        ], [
                AS_IF([test "$kernelsrc" = "NONE"], [
@@ -159,6 +159,13 @@ AC_DEFUN([ZFS_AC_KERNEL], [
        ])
 
        AC_MSG_RESULT([$kernelsrc])
+       AS_IF([test ! -d "$kernelsrc"], [
+               AC_MSG_ERROR([
+       *** Please make sure the kernel devel package for your distribution
+       *** is installed then try again.  If that fails you can specify the
+       *** location of the kernel source with the '--with-linux=PATH' option.])
+       ])
+
        AC_MSG_CHECKING([kernel build directory])
        AS_IF([test -z "$kernelbuild"], [
                AS_IF([test -e "/lib/modules/$(uname -r)/build"], [