forked from openzfs/zfs
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Linux 5.16: wait_on_page_bit() no longer available to modules
Instead, linux/pagemap.h offers a number of folio-specific functions to be called instead. In this case, module/os/linux/zfs/zfs_vnops_os.c wants to call wait_on_page_bit(pp, PG_writeback). This gets replaced with folio_wait_bit(folio_page(pp), PG_writeback). This change modifies the code to conditionally compile that if configure identifies th presence of the folio_wait_bit() function. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Coleman Kane <[email protected]> Closes openzfs#12800
- Loading branch information
1 parent
ded851b
commit c0fb44c
Showing
3 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
dnl # | ||
dnl # Linux 5.16 no longer allows directly calling wait_on_page_bit, and | ||
dnl # instead requires you to call folio-specific functions. In this case, | ||
dnl # wait_on_page_bit(pg, PG_writeback) becomes | ||
dnl # folio_wait_bit(pg, PG_writeback) | ||
dnl # | ||
AC_DEFUN([ZFS_AC_KERNEL_SRC_PAGEMAP_FOLIO_WAIT_BIT], [ | ||
ZFS_LINUX_TEST_SRC([pagemap_has_folio_wait_bit], [ | ||
#include <linux/pagemap.h> | ||
],[ | ||
static struct folio *f = NULL; | ||
folio_wait_bit(f, PG_writeback); | ||
]) | ||
]) | ||
|
||
AC_DEFUN([ZFS_AC_KERNEL_PAGEMAP_FOLIO_WAIT_BIT], [ | ||
AC_MSG_CHECKING([folio_wait_bit() exists]) | ||
ZFS_LINUX_TEST_RESULT([pagemap_has_folio_wait_bit], [ | ||
AC_MSG_RESULT([yes]) | ||
AC_DEFINE(HAVE_PAGEMAP_FOLIO_WAIT_BIT, 1, | ||
[folio_wait_bit() exists]) | ||
],[ | ||
AC_MSG_RESULT([no]) | ||
]) | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters