diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2018-11-27 11:01:43 -0800 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2018-12-04 08:50:49 -0800 |
commit | a579121f94aba4e8bad1a121a0fad050d6925296 (patch) | |
tree | 0d7df144d834ebba726fc47ddaba6da0a7fd9d32 /scripts/Lindent | |
parent | de7243057e7cefa923fa5f467c0f1ec24eef41d2 (diff) | |
download | linux-a579121f94aba4e8bad1a121a0fad050d6925296.tar.bz2 |
xfs: fix PAGE_MASK usage in xfs_free_file_space
In commit e53c4b598, I *tried* to teach xfs to force writeback when we
fzero/fpunch right up to EOF so that if EOF is in the middle of a page,
the post-EOF part of the page gets zeroed before we return to userspace.
Unfortunately, I missed the part where PAGE_MASK is ~(PAGE_SIZE - 1),
which means that we totally fail to zero if we're fpunching and EOF is
within the first page. Worse yet, the same PAGE_MASK thinko plagues the
filemap_write_and_wait_range call, so we'd initiate writeback of the
entire file, which (mostly) masked the thinko.
Drop the tricky PAGE_MASK and replace it with correct usage of PAGE_SIZE
and the proper rounding macros.
Fixes: e53c4b598 ("xfs: ensure post-EOF zeroing happens after zeroing part of a file")
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'scripts/Lindent')
0 files changed, 0 insertions, 0 deletions