Skip to content

Commit

Permalink
Linux 5.2 compat: Directly call wait_on_page_bit()
Browse files Browse the repository at this point in the history
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 openzfs#8794
  • Loading branch information
kusumi authored and allanjude committed Jun 7, 2019
1 parent 7ddae35 commit 430befa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions module/os/linux/zfs/zfs_vnops.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 430befa

Please sign in to comment.