3 dnl # Add support for i_op->tmpfile
5 AC_DEFUN([ZFS_AC_KERNEL_SRC_TMPFILE], [
8 dnl # use struct file instead of struct dentry
10 ZFS_LINUX_TEST_SRC([inode_operations_tmpfile], [
12 int tmpfile(struct user_namespace *userns,
13 struct inode *inode, struct file *file,
14 umode_t mode) { return 0; }
15 static struct inode_operations
16 iops __attribute__ ((unused)) = {
22 dnl # add support for userns parameter to tmpfile
24 ZFS_LINUX_TEST_SRC([inode_operations_tmpfile_dentry_userns], [
26 int tmpfile(struct user_namespace *userns,
27 struct inode *inode, struct dentry *dentry,
28 umode_t mode) { return 0; }
29 static struct inode_operations
30 iops __attribute__ ((unused)) = {
34 ZFS_LINUX_TEST_SRC([inode_operations_tmpfile_dentry], [
36 int tmpfile(struct inode *inode, struct dentry *dentry,
37 umode_t mode) { return 0; }
38 static struct inode_operations
39 iops __attribute__ ((unused)) = {
45 AC_DEFUN([ZFS_AC_KERNEL_TMPFILE], [
46 AC_MSG_CHECKING([whether i_op->tmpfile() exists])
47 ZFS_LINUX_TEST_RESULT([inode_operations_tmpfile], [
49 AC_DEFINE(HAVE_TMPFILE, 1, [i_op->tmpfile() exists])
50 AC_DEFINE(HAVE_TMPFILE_USERNS, 1, [i_op->tmpfile() has userns])
52 ZFS_LINUX_TEST_RESULT([inode_operations_tmpfile_dentry_userns], [
54 AC_DEFINE(HAVE_TMPFILE, 1, [i_op->tmpfile() exists])
55 AC_DEFINE(HAVE_TMPFILE_USERNS, 1, [i_op->tmpfile() has userns])
56 AC_DEFINE(HAVE_TMPFILE_DENTRY, 1, [i_op->tmpfile() uses old dentry signature])
58 ZFS_LINUX_TEST_RESULT([inode_operations_tmpfile_dentry], [
60 AC_DEFINE(HAVE_TMPFILE, 1, [i_op->tmpfile() exists])
61 AC_DEFINE(HAVE_TMPFILE_DENTRY, 1, [i_op->tmpfile() uses old dentry signature])
63 ZFS_LINUX_REQUIRE_API([i_op->tmpfile()], [3.11])