Skip to content
Commit d3c51c55 authored by Andreas Gruenbacher's avatar Andreas Gruenbacher
Browse files

gfs2: Fix underflow in gfs2_page_mkwrite



On filesystems with a block size smaller than PAGE_SIZE and non-empty
files smaller then PAGE_SIZE, gfs2_page_mkwrite could end up allocating
excess blocks beyond the end of the file, similar to fallocate.  This
doesn't make sense; fix it.

Reported-by: default avatarBob Peterson <rpeterso@redhat.com>
Fixes: 184b4e60 ("gfs2: Fix end-of-file handling in gfs2_page_mkwrite")
Cc: stable@vger.kernel.org # v5.5+
Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
parent 38a618db
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment