1 AC_DEFUN([ZFS_AC_KERNEL_SRC_SETATTR_PREPARE], [
4 dnl # The inode_change_ok() function has been renamed setattr_prepare()
5 dnl # and updated to take a dentry rather than an inode.
7 ZFS_LINUX_TEST_SRC([setattr_prepare], [
10 struct dentry *dentry = NULL;
11 struct iattr *attr = NULL;
12 int error __attribute__ ((unused)) =
13 setattr_prepare(dentry, attr);
18 dnl # The setattr_prepare() function has been changed to accept a new argument
19 dnl # for struct user_namespace*
21 ZFS_LINUX_TEST_SRC([setattr_prepare_userns], [
24 struct dentry *dentry = NULL;
25 struct iattr *attr = NULL;
26 struct user_namespace *userns = NULL;
27 int error __attribute__ ((unused)) =
28 setattr_prepare(userns, dentry, attr);
33 dnl # The first arg of setattr_prepare() is changed to struct mnt_idmap*
35 ZFS_LINUX_TEST_SRC([setattr_prepare_mnt_idmap], [
38 struct dentry *dentry = NULL;
39 struct iattr *attr = NULL;
40 struct mnt_idmap *idmap = NULL;
41 int error __attribute__ ((unused)) =
42 setattr_prepare(idmap, dentry, attr);
46 AC_DEFUN([ZFS_AC_KERNEL_SETATTR_PREPARE], [
47 AC_MSG_CHECKING([whether setattr_prepare() is available and accepts struct mnt_idmap*])
48 ZFS_LINUX_TEST_RESULT_SYMBOL([setattr_prepare_mnt_idmap],
49 [setattr_prepare], [fs/attr.c], [
51 AC_DEFINE(HAVE_SETATTR_PREPARE_IDMAP, 1,
52 [setattr_prepare() accepts mnt_idmap])
56 AC_MSG_CHECKING([whether setattr_prepare() is available and accepts struct user_namespace*])
57 ZFS_LINUX_TEST_RESULT_SYMBOL([setattr_prepare_userns],
58 [setattr_prepare], [fs/attr.c], [
60 AC_DEFINE(HAVE_SETATTR_PREPARE_USERNS, 1,
61 [setattr_prepare() accepts user_namespace])
65 AC_MSG_CHECKING([whether setattr_prepare() is available, doesn't accept user_namespace])
66 ZFS_LINUX_TEST_RESULT_SYMBOL([setattr_prepare],
67 [setattr_prepare], [fs/attr.c], [
69 AC_DEFINE(HAVE_SETATTR_PREPARE_NO_USERNS, 1,
70 [setattr_prepare() is available, doesn't accept user_namespace])