diff options
Diffstat (limited to 'fs/xfs/xfs_bmap_util.c')
-rw-r--r-- | fs/xfs/xfs_bmap_util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/xfs_bmap_util.c b/fs/xfs/xfs_bmap_util.c index 404e581f1ea1..1ee8c5539fa4 100644 --- a/fs/xfs/xfs_bmap_util.c +++ b/fs/xfs/xfs_bmap_util.c | |||
@@ -1126,9 +1126,9 @@ xfs_free_file_space( | |||
1126 | * page could be mmap'd and iomap_zero_range doesn't do that for us. | 1126 | * page could be mmap'd and iomap_zero_range doesn't do that for us. |
1127 | * Writeback of the eof page will do this, albeit clumsily. | 1127 | * Writeback of the eof page will do this, albeit clumsily. |
1128 | */ | 1128 | */ |
1129 | if (offset + len >= XFS_ISIZE(ip) && ((offset + len) & PAGE_MASK)) { | 1129 | if (offset + len >= XFS_ISIZE(ip) && offset_in_page(offset + len) > 0) { |
1130 | error = filemap_write_and_wait_range(VFS_I(ip)->i_mapping, | 1130 | error = filemap_write_and_wait_range(VFS_I(ip)->i_mapping, |
1131 | (offset + len) & ~PAGE_MASK, LLONG_MAX); | 1131 | round_down(offset + len, PAGE_SIZE), LLONG_MAX); |
1132 | } | 1132 | } |
1133 | 1133 | ||
1134 | return error; | 1134 | return error; |