summaryrefslogtreecommitdiffstats
path: root/config/kernel-setattr-prepare.m4
diff options
context:
space:
mode:
Diffstat (limited to 'config/kernel-setattr-prepare.m4')
-rw-r--r--config/kernel-setattr-prepare.m416
1 files changed, 10 insertions, 6 deletions
diff --git a/config/kernel-setattr-prepare.m4 b/config/kernel-setattr-prepare.m4
index 32f7deb77..45408c45c 100644
--- a/config/kernel-setattr-prepare.m4
+++ b/config/kernel-setattr-prepare.m4
@@ -3,17 +3,21 @@ dnl # 4.9 API change
dnl # The inode_change_ok() function has been renamed setattr_prepare()
dnl # and updated to take a dentry rather than an inode.
dnl #
-AC_DEFUN([ZFS_AC_KERNEL_SETATTR_PREPARE],
- [AC_MSG_CHECKING([whether setattr_prepare() is available])
- ZFS_LINUX_TRY_COMPILE_SYMBOL([
+AC_DEFUN([ZFS_AC_KERNEL_SRC_SETATTR_PREPARE], [
+ ZFS_LINUX_TEST_SRC([setattr_prepare], [
#include <linux/fs.h>
], [
struct dentry *dentry = NULL;
struct iattr *attr = NULL;
- int error;
+ int error __attribute__ ((unused)) =
+ setattr_prepare(dentry, attr);
+ ])
+])
- error = setattr_prepare(dentry, attr);
- ], [setattr_prepare], [fs/attr.c], [
+AC_DEFUN([ZFS_AC_KERNEL_SETATTR_PREPARE], [
+ AC_MSG_CHECKING([whether setattr_prepare() is available])
+ ZFS_LINUX_TEST_RESULT_SYMBOL([setattr_prepare],
+ [setattr_prepare], [fs/attr.c], [
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_SETATTR_PREPARE, 1,
[setattr_prepare() is available])