diff options
Diffstat (limited to 'config/kernel-inode-getattr.m4')
-rw-r--r-- | config/kernel-inode-getattr.m4 | 56 |
1 files changed, 21 insertions, 35 deletions
diff --git a/config/kernel-inode-getattr.m4 b/config/kernel-inode-getattr.m4 index f10e0b251..48391d66f 100644 --- a/config/kernel-inode-getattr.m4 +++ b/config/kernel-inode-getattr.m4 @@ -2,9 +2,8 @@ dnl # dnl # Linux 4.11 API dnl # See torvalds/linux@a528d35 dnl # -AC_DEFUN([ZFS_AC_PATH_KERNEL_IOPS_GETATTR], [ - AC_MSG_CHECKING([whether iops->getattr() takes a path]) - ZFS_LINUX_TRY_COMPILE([ +AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_GETATTR], [ + ZFS_LINUX_TEST_SRC([inode_operations_getattr_path], [ #include <linux/fs.h> int test_getattr( @@ -16,24 +15,9 @@ AC_DEFUN([ZFS_AC_PATH_KERNEL_IOPS_GETATTR], [ iops __attribute__ ((unused)) = { .getattr = test_getattr, }; - ],[ - ],[ - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_PATH_IOPS_GETATTR, 1, - [iops->getattr() takes a path]) - ],[ - AC_MSG_RESULT(no) - ]) -]) - + ],[]) - -dnl # -dnl # Linux 3.9 - 4.10 API -dnl # -AC_DEFUN([ZFS_AC_VFSMOUNT_KERNEL_IOPS_GETATTR], [ - AC_MSG_CHECKING([whether iops->getattr() takes a vfsmount]) - ZFS_LINUX_TRY_COMPILE([ + ZFS_LINUX_TEST_SRC([inode_operations_getattr_vfsmount], [ #include <linux/fs.h> int test_getattr( @@ -45,23 +29,25 @@ AC_DEFUN([ZFS_AC_VFSMOUNT_KERNEL_IOPS_GETATTR], [ iops __attribute__ ((unused)) = { .getattr = test_getattr, }; - ],[ - ],[ + ],[]) +]) + +AC_DEFUN([ZFS_AC_KERNEL_INODE_GETATTR], [ + AC_MSG_CHECKING([whether iops->getattr() takes a path]) + ZFS_LINUX_TEST_RESULT([inode_operations_getattr_path], [ AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_VFSMOUNT_IOPS_GETATTR, 1, - [iops->getattr() takes a vfsmount]) + AC_DEFINE(HAVE_PATH_IOPS_GETATTR, 1, + [iops->getattr() takes a path]) ],[ AC_MSG_RESULT(no) - ]) -]) - -dnl # -dnl # The interface of the getattr callback from the inode_operations -dnl # structure changed. Also, the interface of the simple_getattr() -dnl # function provided by the kernel changed. -dnl # -AC_DEFUN([ZFS_AC_KERNEL_INODE_OPERATIONS_GETATTR], [ - ZFS_AC_PATH_KERNEL_IOPS_GETATTR - ZFS_AC_VFSMOUNT_KERNEL_IOPS_GETATTR + AC_MSG_CHECKING([whether iops->getattr() takes a vfsmount]) + ZFS_LINUX_TEST_RESULT([inode_operations_getattr_vfsmount], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_VFSMOUNT_IOPS_GETATTR, 1, + [iops->getattr() takes a vfsmount]) + ],[ + AC_MSG_RESULT(no) + ]) + ]) ]) |