2 dnl # Linux 5.14 adds a change to require set_page_dirty to be manually
3 dnl # wired up in struct address_space_operations. Determine if this needs
4 dnl # to be done. This patch set also introduced __set_page_dirty_nobuffers
5 dnl # declaration in linux/pagemap.h, so these tests look for the presence
6 dnl # of that function to tell the compiler to assign set_page_dirty in
7 dnl # module/os/linux/zfs/zpl_file.c
9 AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_SET_PAGE_DIRTY_NOBUFFERS], [
10 ZFS_LINUX_TEST_SRC([vfs_has_set_page_dirty_nobuffers], [
11 #include <linux/pagemap.h>
14 static const struct address_space_operations
15 aops __attribute__ ((unused)) = {
16 .set_page_dirty = __set_page_dirty_nobuffers,
21 AC_DEFUN([ZFS_AC_KERNEL_VFS_SET_PAGE_DIRTY_NOBUFFERS], [
23 dnl # Linux 5.14 change requires set_page_dirty() to be assigned
24 dnl # in address_space_operations()
26 AC_MSG_CHECKING([whether __set_page_dirty_nobuffers exists])
27 ZFS_LINUX_TEST_RESULT([vfs_has_set_page_dirty_nobuffers], [
29 AC_DEFINE(HAVE_VFS_SET_PAGE_DIRTY_NOBUFFERS, 1,
30 [__set_page_dirty_nobuffers exists])