summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorDavid Hildenbrand (Arm) <david@kernel.org>2026-10-29 11:43:30 +0100
committerDavid Hildenbrand (Arm) <david@kernel.org>2026-11-02 11:21:28 +0100
commit23f2a880c0b9518fcb7e7e2ad54a29c0a2c4fba0 (patch)
treeba7e33be96a81bcfe414d47085570687f0168343 /tools/lib/python
parent0c800435394a172f33bf4df4a5a04e187546cc9b (diff)
mm/shmem: discard whole new large folios on fallocate rollback
When undoing a failed fallocate(), shmem_undo_range() must discard each newly allocated folio. Its second scan instead passes large folios to truncate_inode_partial_folio(), which does not necessarily discard the entire large folio, but instead tries splitting it to discard only the requested range. For example, with huge=always, a failed allocation starting at offset 4 KiB can leave page 0 allocated in an otherwise empty file. Discard the whole folio when unfalloc is set. Note that we enter this path only for folios that are not uptodate, and can consequently be dropped without losing any data. Fixes: 55ac8bbe358b ("mm/shmem: fix race in shmem_undo_range w/THP") Cc: stable@vger.kernel.org Reviewed-by: Zi Yan <ziy@nvidia.com> Acked-by: Kiryl Shutsemau (Meta) <kas@kernel.org> Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com> Tested-by: Gregory Price (Meta) <gourry@gourry.net> Link: https://patch.msgid.link/20261029-fixes_shmem-v4-9-392fc715d8f6@kernel.org Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions