diff options
| author | Jan Kara <jack@suse.cz> | 2026-09-02 16:36:57 +0200 |
|---|---|---|
| committer | Andreas Gruenbacher <agruenba@redhat.com> | 2026-09-11 15:08:36 +0200 |
| commit | a52652efd8f985397e87669f505af83f06e335cf (patch) | |
| tree | b340a34ed9740653fccbc6878b8d72d40e6c2995 /tools/lib/python | |
| parent | c6b4fcac9a4811032891904597590776fc4c81aa (diff) | |
| download | linux-next-a52652efd8f985397e87669f505af83f06e335cf.tar.gz linux-next-a52652efd8f985397e87669f505af83f06e335cf.zip | |
gfs2: Fix journaled truncate range end offset
The third argument to truncate_pagecache_range() is the inclusive end
offset, but gfs2_journaled_truncate_range() passes the length of each
chunk. A hole punch at an offset larger than its length therefore
creates an inverted range.
Commit 86066914edff ("gfs2: Don't support fallocate on jdata files")
disables fallocate for jdata files. Otherwise, the following bug
could occur:
The MM truncation path then underflows the unsigned partial-folio
length and passes an oversized range to folio_zero_range(), triggering
a BUG. Pass the last byte of the chunk so page-cache invalidation
covers the intended range.
Fixes: 4e56a6411fbc ("gfs2: Implement fallocate(FALLOC_FL_PUNCH_HOLE)")
Reported-by: VEGA <vega@nebusec.ai>
Assisted-by: LLM
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
