diff options
author | Tomohiro Kusumi <[email protected]> | 2019-05-26 05:42:09 +0900 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2019-05-25 13:42:09 -0700 |
commit | bfd5a709e74dfe9358b339b4a17c4ad6567b85c7 (patch) | |
tree | 9b6617b5977cf7d9f3037bcc183424fdeeeb25d6 /module/zfs/zfs_vnops.c | |
parent | 36c110f9943f3abe2ac59ffa7e76b48e8dbfc1b6 (diff) |
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 <[email protected]>
Reviewed-by: loli10K <[email protected]>
Signed-off-by: Tomohiro Kusumi <[email protected]>
Closes #8794
Diffstat (limited to 'module/zfs/zfs_vnops.c')
-rw-r--r-- | module/zfs/zfs_vnops.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/module/zfs/zfs_vnops.c b/module/zfs/zfs_vnops.c index 41c1bd255..885d9633b 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); |