From 2fb37bcadd08d5d7524a370765d926df2f2e18d9 Mon Sep 17 00:00:00 2001 From: Tomohiro Kusumi Date: Sun, 26 May 2019 05:42:09 +0900 Subject: [PATCH] Linux 5.2 compat: Directly call wait_on_page_bit() wait_on_page_writeback() was made GPL only in torvalds/linux@19343b5bdd. Directly call wait_on_page_bit() without using wait_on_page_writeback() interface, given zfs_putpage() is the only caller for now. Reviewed-by: Brian Behlendorf Reviewed-by: loli10K Signed-off-by: Tomohiro Kusumi Closes #8794 --- module/zfs/zfs_vnops.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/module/zfs/zfs_vnops.c b/module/zfs/zfs_vnops.c index 41c1bd2557..885d9633b0 100644 --- a/module/zfs/zfs_vnops.c +++ b/module/zfs/zfs_vnops.c @@ -4526,8 +4526,10 @@ zfs_putpage(struct inode *ip, struct page *pp, struct writeback_control *wbc) unlock_page(pp); rangelock_exit(lr); - if (wbc->sync_mode != WB_SYNC_NONE) - wait_on_page_writeback(pp); + if (wbc->sync_mode != WB_SYNC_NONE) { + if (PageWriteback(pp)) + wait_on_page_bit(pp, PG_writeback); + } ZFS_EXIT(zfsvfs); return (0);