Darrick J. Wong
a579121f94
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 >
2018-12-04 08:50:49 -08:00
..
2018-11-21 10:10:53 -08:00
2018-10-18 17:20:35 +11:00
2018-05-15 18:12:50 -07:00
2018-06-06 14:17:53 -07:00
2018-06-06 14:17:53 -07:00
2018-07-29 22:37:09 -07:00
2018-06-06 14:17:53 -07:00
2018-06-06 14:17:53 -07:00
2018-06-06 14:17:53 -07:00
2018-10-18 17:17:50 +11:00
2018-10-18 17:17:50 +11:00
2018-07-26 10:15:15 -07:00
2018-08-02 23:05:14 -07:00
2018-08-02 23:05:14 -07:00
2018-08-02 23:05:13 -07:00
2018-12-04 08:50:49 -08:00
2018-11-21 10:10:53 -08:00
2018-11-20 10:36:01 -08:00
2018-09-29 13:45:26 +10:00
2018-10-18 17:21:49 +11:00
2018-10-18 17:20:30 +11:00
2018-06-06 14:17:53 -07:00
2018-07-23 09:08:00 -07:00
2017-11-02 11:10:55 +01:00
2018-06-06 14:17:53 -07:00
2018-06-06 14:17:53 -07:00
2018-08-07 10:57:13 -07:00
2018-06-06 14:17:53 -07:00
2018-07-23 09:08:01 -07:00
2018-06-06 14:17:53 -07:00
2018-07-26 10:15:16 -07:00
2018-06-06 14:17:53 -07:00
2018-06-06 14:17:53 -07:00
2018-06-06 14:17:53 -07:00
2018-06-06 14:17:53 -07:00
2018-06-06 14:17:53 -07:00
2018-11-19 13:30:38 -08:00
2018-08-02 23:05:13 -07:00
2018-06-06 14:17:53 -07:00
2018-07-23 09:08:00 -07:00
2018-06-06 14:17:53 -07:00
2018-10-18 17:20:39 +11:00
2018-06-06 14:17:53 -07:00
2018-06-06 14:17:53 -07:00
2018-07-30 07:57:48 -07:00
2018-06-06 14:17:53 -07:00
2018-06-06 14:17:53 -07:00
2018-06-06 14:17:53 -07:00
2018-07-30 07:57:48 -07:00
2018-06-06 14:17:53 -07:00
2018-09-29 13:41:58 +10:00
2018-08-02 23:05:14 -07:00
2018-06-06 14:17:53 -07:00
2018-06-06 14:17:53 -07:00
2018-11-06 07:50:50 -08:00
2018-06-06 14:17:53 -07:00
2018-10-18 17:19:48 +11:00
2018-07-31 13:18:09 -07:00
2018-09-29 13:40:40 +10:00
2018-06-06 14:17:53 -07:00
2018-07-26 10:15:16 -07:00
2018-06-06 14:17:53 -07:00
2018-06-08 10:07:52 -07:00
2018-06-06 14:17:53 -07:00
2018-06-06 14:17:53 -07:00
2018-09-29 13:50:41 +10:00
2018-08-03 08:17:54 -07:00
2018-08-01 07:40:48 -07:00
2018-11-06 07:50:50 -08:00
2017-11-02 11:10:55 +01:00
2018-08-13 07:58:27 -07:00
2018-07-26 10:15:17 -07:00
2018-06-06 14:17:53 -07:00
2018-06-06 14:17:53 -07:00
2018-06-06 14:17:53 -07:00
2018-05-22 07:19:08 -07:00
2018-05-22 07:19:08 -07:00
2018-11-26 15:01:37 -08:00
2018-07-26 10:15:16 -07:00
2018-07-26 10:15:16 -07:00
2018-06-06 14:17:53 -07:00
2018-06-06 14:17:53 -07:00
2018-07-26 10:15:16 -07:00
2018-08-02 23:05:14 -07:00
2018-08-02 23:05:13 -07:00
2018-11-21 10:10:53 -08:00
2018-11-02 09:33:08 -07:00
2018-06-06 14:17:53 -07:00
2018-06-06 14:17:53 -07:00
2018-07-26 10:15:16 -07:00
2018-06-06 14:17:53 -07:00
2018-10-18 17:21:39 +11:00
2018-10-18 17:21:39 +11:00
2018-10-18 17:20:19 +11:00
2018-06-06 14:17:53 -07:00
2018-08-02 23:05:14 -07:00
2018-06-06 14:17:53 -07:00
2018-06-06 14:17:53 -07:00
2018-06-06 14:17:53 -07:00
2018-06-06 14:17:53 -07:00
2018-06-06 14:17:53 -07:00
2018-06-06 14:17:53 -07:00
2018-11-20 10:35:05 -08:00
2018-10-18 17:21:49 +11:00
2018-08-02 23:05:14 -07:00
2018-10-18 17:20:35 +11:00
2018-06-06 14:17:53 -07:00
2018-08-02 23:05:14 -07:00
2018-06-15 07:31:07 +09:00
2018-06-06 14:17:53 -07:00
2018-08-02 23:05:14 -07:00
2018-08-02 23:05:14 -07:00
2018-09-29 13:46:21 +10:00
2018-10-18 17:20:35 +11:00
2018-06-06 14:17:53 -07:00
2018-08-12 08:37:31 -07:00