]>
Commit | Line | Data |
---|---|---|
ace1eae8 CC |
1 | dnl # |
2 | dnl # 3.11 API change | |
3 | dnl # Add support for i_op->tmpfile | |
4 | dnl # | |
608f8749 | 5 | AC_DEFUN([ZFS_AC_KERNEL_SRC_TMPFILE], [ |
0b1b66b4 RE |
6 | dnl # |
7 | dnl # 5.11 API change | |
8 | dnl # add support for userns parameter to tmpfile | |
9 | dnl # | |
10 | ZFS_LINUX_TEST_SRC([inode_operations_tmpfile_userns], [ | |
ace1eae8 | 11 | #include <linux/fs.h> |
0b1b66b4 RE |
12 | int tmpfile(struct user_namespace *userns, |
13 | struct inode *inode, struct dentry *dentry, | |
ace1eae8 CC |
14 | umode_t mode) { return 0; } |
15 | static struct inode_operations | |
16 | iops __attribute__ ((unused)) = { | |
17 | .tmpfile = tmpfile, | |
18 | }; | |
608f8749 | 19 | ],[]) |
0b1b66b4 RE |
20 | ZFS_LINUX_TEST_SRC([inode_operations_tmpfile], [ |
21 | #include <linux/fs.h> | |
22 | int tmpfile(struct inode *inode, struct dentry *dentry, | |
23 | umode_t mode) { return 0; } | |
24 | static struct inode_operations | |
25 | iops __attribute__ ((unused)) = { | |
26 | .tmpfile = tmpfile, | |
27 | }; | |
28 | ],[]) | |
608f8749 BB |
29 | ]) |
30 | ||
31 | AC_DEFUN([ZFS_AC_KERNEL_TMPFILE], [ | |
32 | AC_MSG_CHECKING([whether i_op->tmpfile() exists]) | |
0b1b66b4 | 33 | ZFS_LINUX_TEST_RESULT([inode_operations_tmpfile_userns], [ |
ace1eae8 | 34 | AC_MSG_RESULT(yes) |
608f8749 | 35 | AC_DEFINE(HAVE_TMPFILE, 1, [i_op->tmpfile() exists]) |
0b1b66b4 | 36 | AC_DEFINE(HAVE_TMPFILE_USERNS, 1, [i_op->tmpfile() has userns]) |
ace1eae8 | 37 | ],[ |
0b1b66b4 RE |
38 | ZFS_LINUX_TEST_RESULT([inode_operations_tmpfile], [ |
39 | AC_MSG_RESULT(yes) | |
40 | AC_DEFINE(HAVE_TMPFILE, 1, [i_op->tmpfile() exists]) | |
41 | ],[ | |
42 | AC_MSG_RESULT(no) | |
43 | ]) | |
ace1eae8 CC |
44 | ]) |
45 | ]) |