xref: /freebsd/sys/contrib/openzfs/config/kernel-writepage_t.m4 (revision 9f27341c336aa12f6c7163c17e646e76c813b689)
1AC_DEFUN([ZFS_AC_KERNEL_SRC_WRITEPAGE_T], [
2	dnl #
3	dnl # 6.3 API change
4	dnl # The writepage_t function type now has its first argument as
5	dnl # struct folio* instead of struct page*
6	dnl #
7	ZFS_LINUX_TEST_SRC([writepage_t_folio], [
8		#include <linux/writeback.h>
9		int putpage(struct folio *folio,
10		    struct writeback_control *wbc, void *data)
11		{ return 0; }
12		writepage_t func = putpage;
13	],[])
14])
15
16AC_DEFUN([ZFS_AC_KERNEL_WRITEPAGE_T], [
17	AC_MSG_CHECKING([whether int (*writepage_t)() takes struct folio*])
18	ZFS_LINUX_TEST_RESULT([writepage_t_folio], [
19		AC_MSG_RESULT(yes)
20		AC_DEFINE(HAVE_WRITEPAGE_T_FOLIO, 1,
21		   [int (*writepage_t)() takes struct folio*])
22	],[
23		AC_MSG_RESULT(no)
24	])
25])
26
27