linux_dsm_epyc7002/fs/iomap
Andreas Gruenbacher 243145bc43 fs: Fix page_mkwrite off-by-one errors
The check in block_page_mkwrite that is meant to determine whether an
offset is within the inode size is off by one.  This bug has been copied
into iomap_page_mkwrite and several filesystems (ubifs, ext4, f2fs,
ceph).

Fix that by introducing a new page_mkwrite_check_truncate helper that
checks for truncate and computes the bytes in the page up to EOF.  Use
the helper in iomap.

NOTE from Darrick: The original patch fixed a number of filesystems, but
then there were merge conflicts with the f2fs for-next tree; a
subsequent re-submission of the patch had different btrfs changes with
no explanation; and Christoph complained that each per-fs fix should be
a separate patch.  In my view that's too much risk to take on, so I
decided to drop all the hunks except for iomap, since I've actually QA'd
XFS.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
[darrick: drop everything but the iomap parts]
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
2020-01-06 08:58:23 -08:00
..
apply.c iomap: trace iomap_appply results 2019-11-22 08:36:00 -08:00
buffered-io.c fs: Fix page_mkwrite off-by-one errors 2020-01-06 08:58:23 -08:00
direct-io.c iomap: remove unneeded variable in iomap_dio_rw() 2019-11-26 09:28:47 -08:00
fiemap.c iomap: iomap_bmap should check iomap_apply return value 2019-11-08 07:44:12 -08:00
Makefile iomap: lift common tracing code from xfs to iomap 2019-10-21 08:51:59 -07:00
seek.c iomap: use a srcmap for a read-modify-write I/O 2019-10-21 08:51:59 -07:00
swapfile.c iomap: use a srcmap for a read-modify-write I/O 2019-10-21 08:51:59 -07:00
trace.c iomap: lift common tracing code from xfs to iomap 2019-10-21 08:51:59 -07:00
trace.h iomap: trace iomap_appply results 2019-11-22 08:36:00 -08:00