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 <behlendorf1@llnl.gov>
Reviewed-by: loli10K <ezomori.nozomu@gmail.com>
Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@osnexus.com>
Closes #8794
This commit is contained in:
Tomohiro Kusumi 2019-05-26 05:42:09 +09:00 committed by Brian Behlendorf
parent a727f69e52
commit 2fb37bcadd

View File

@ -4526,8 +4526,10 @@ zfs_putpage(struct inode *ip, struct page *pp, struct writeback_control *wbc)
unlock_page(pp); unlock_page(pp);
rangelock_exit(lr); rangelock_exit(lr);
if (wbc->sync_mode != WB_SYNC_NONE) if (wbc->sync_mode != WB_SYNC_NONE) {
wait_on_page_writeback(pp); if (PageWriteback(pp))
wait_on_page_bit(pp, PG_writeback);
}
ZFS_EXIT(zfsvfs); ZFS_EXIT(zfsvfs);
return (0); return (0);