]> git.proxmox.com Git - mirror_zfs.git/blame - config/kernel-readpages.m4
Allow mounting snapshots in .zfs/snapshot as a regular user
[mirror_zfs.git] / config / kernel-readpages.m4
CommitLineData
7d524c06
RS
1dnl #
2dnl # Linux 5.18 removes address_space_operations ->readpages in favour of
3dnl # ->readahead
4dnl #
5AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_READPAGES], [
6 ZFS_LINUX_TEST_SRC([vfs_has_readpages], [
7 #include <linux/fs.h>
8
9 static const struct address_space_operations
10 aops __attribute__ ((unused)) = {
11 .readpages = NULL,
12 };
13 ],[])
14])
15
16AC_DEFUN([ZFS_AC_KERNEL_VFS_READPAGES], [
b9d98453 17 AC_MSG_CHECKING([whether aops->readpages exists])
7d524c06
RS
18 ZFS_LINUX_TEST_RESULT([vfs_has_readpages], [
19 AC_MSG_RESULT([yes])
20 AC_DEFINE(HAVE_VFS_READPAGES, 1,
21 [address_space_operations->readpages exists])
22 ],[
23 AC_MSG_RESULT([no])
24 ])
25])