]> git.proxmox.com Git - mirror_zfs.git/blame - config/kernel-setattr-prepare.m4
OpenZFS 9185 - Enable testing over NFS in ZFS performance tests
[mirror_zfs.git] / config / kernel-setattr-prepare.m4
CommitLineData
3b0ba3ba
BB
1dnl #
2dnl # 4.9 API change
3dnl # The inode_change_ok() function has been renamed setattr_prepare()
4dnl # and updated to take a dentry rather than an inode.
5dnl #
6AC_DEFUN([ZFS_AC_KERNEL_SETATTR_PREPARE],
7 [AC_MSG_CHECKING([whether setattr_prepare() is available])
8 ZFS_LINUX_TRY_COMPILE_SYMBOL([
9 #include <linux/fs.h>
10 ], [
11 struct dentry *dentry = NULL;
12 struct iattr *attr = NULL;
13 int error;
14
15 error = setattr_prepare(dentry, attr);
16 ], [setattr_prepare], [fs/attr.c], [
17 AC_MSG_RESULT(yes)
18 AC_DEFINE(HAVE_SETATTR_PREPARE, 1,
19 [setattr_prepare() is available])
20 ], [
21 AC_MSG_RESULT(no)
22 ])
23])