]> git.proxmox.com Git - mirror_zfs.git/blame - config/kernel-setattr-prepare.m4
Clean up RAIDZ/DRAID ereport code
[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 #
608f8749
BB
6AC_DEFUN([ZFS_AC_KERNEL_SRC_SETATTR_PREPARE], [
7 ZFS_LINUX_TEST_SRC([setattr_prepare], [
3b0ba3ba
BB
8 #include <linux/fs.h>
9 ], [
10 struct dentry *dentry = NULL;
11 struct iattr *attr = NULL;
608f8749
BB
12 int error __attribute__ ((unused)) =
13 setattr_prepare(dentry, attr);
14 ])
15])
3b0ba3ba 16
608f8749
BB
17AC_DEFUN([ZFS_AC_KERNEL_SETATTR_PREPARE], [
18 AC_MSG_CHECKING([whether setattr_prepare() is available])
19 ZFS_LINUX_TEST_RESULT_SYMBOL([setattr_prepare],
20 [setattr_prepare], [fs/attr.c], [
3b0ba3ba
BB
21 AC_MSG_RESULT(yes)
22 AC_DEFINE(HAVE_SETATTR_PREPARE, 1,
23 [setattr_prepare() is available])
24 ], [
25 AC_MSG_RESULT(no)
26 ])
27])