]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - zfs/config/kernel-vfs-iterate.m4
media: dvb_ca_en50221: prevent using slot_info for Spectre attacs
[mirror_ubuntu-bionic-kernel.git] / zfs / config / kernel-vfs-iterate.m4
CommitLineData
70e083d2
TG
1AC_DEFUN([ZFS_AC_KERNEL_VFS_ITERATE], [
2 dnl #
3 dnl # 4.7 API change
4 dnl #
5 AC_MSG_CHECKING([whether fops->iterate_shared() is available])
6 ZFS_LINUX_TRY_COMPILE([
7 #include <linux/fs.h>
8 int iterate(struct file *filp, struct dir_context * context)
9 { return 0; }
10
11 static const struct file_operations fops
12 __attribute__ ((unused)) = {
13 .iterate_shared = iterate,
14 };
15 ],[
16 ],[
17 AC_MSG_RESULT(yes)
18 AC_DEFINE(HAVE_VFS_ITERATE_SHARED, 1,
19 [fops->iterate_shared() is available])
20 ],[
21 AC_MSG_RESULT(no)
22
23 dnl #
24 dnl # 3.11 API change
25 dnl #
26 AC_MSG_CHECKING([whether fops->iterate() is available])
27 ZFS_LINUX_TRY_COMPILE([
28 #include <linux/fs.h>
29 int iterate(struct file *filp, struct dir_context * context)
30 { return 0; }
31
32 static const struct file_operations fops
33 __attribute__ ((unused)) = {
34 .iterate = iterate,
35 };
36 ],[
37 ],[
38 AC_MSG_RESULT(yes)
39 AC_DEFINE(HAVE_VFS_ITERATE, 1,
40 [fops->iterate() is available])
41 ],[
42 AC_MSG_RESULT(no)
43
44 AC_MSG_CHECKING([whether fops->readdir() is available])
45 ZFS_LINUX_TRY_COMPILE([
46 #include <linux/fs.h>
47 int readdir(struct file *filp, void *entry, filldir_t func)
48 { return 0; }
49
50 static const struct file_operations fops
51 __attribute__ ((unused)) = {
52 .readdir = readdir,
53 };
54 ],[
55 ],[
56 AC_MSG_RESULT(yes)
57 AC_DEFINE(HAVE_VFS_READDIR, 1,
58 [fops->readdir() is available])
59 ],[
60 AC_MSG_ERROR(no; file a bug report with ZFSOnLinux)
61 ])
62 ])
63 ])
64])