summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruenba@redhat.com>2020-01-06 08:58:23 -0800
committerDarrick J. Wong <darrick.wong@oracle.com>2020-01-06 08:58:23 -0800
commit62e298db3fc3ebf41d996f3c86b44cbbdd3286bc (patch)
treee517d8f0d87dc0e9f953aa943a3b6dab0a5e365a /crypto
parentfd6988496e79a6a4bdb514a4655d2920209eb85d (diff)
fs: Fix page_mkwrite off-by-one errorsiomap-5.6-merge-2
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 the above mentioned filesystems. In addition, use the new helper in btrfs as well. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Acked-by: David Sterba <dsterba@suse.com> (btrfs part) Acked-by: Richard Weinberger <richard@nod.at> (ubifs part) Acked-by: Theodore Ts'o <tytso@mit.edu> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> [darrick: drop the f2fs part (no ack) and fix build warning] Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'crypto')
0 files changed, 0 insertions, 0 deletions