diff options
| author | Joanne Koong <joannelkoong@gmail.com> | 2026-09-15 18:05:26 -0700 |
|---|---|---|
| committer | Miklos Szeredi <mszeredi@redhat.com> | 2026-09-25 13:00:37 +0200 |
| commit | a68d10dd8f3d408df9b17bb7ad0054d1272b136c (patch) | |
| tree | 57e73808ecabfbe479624b36ed6d037f10f297ea /tools/lib/python | |
| parent | d1c723c516dc2d43b3a5d668839da21c466953f4 (diff) | |
| download | linux-next-a68d10dd8f3d408df9b17bb7ad0054d1272b136c.tar.gz linux-next-a68d10dd8f3d408df9b17bb7ad0054d1272b136c.zip | |
fuse: replace folio_test_highmem() with folio_test_partial_kmap()
fuse_copy_folio() maps the folio with kmap_local_folio() and limits the
copy to the rest of the mapped page when the folio is in highmem, since
kmap_local_folio() only maps one page in that case.
folio_test_highmem() is not the most accurate test. On a highmem build
with CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP, kmap_local_page() maps just one
page even for lowmem folios, where folio_test_highmem() returns false
(see __kmap_local_page_prot() in mm/highmem.c).
The other highmem.h helpers that walk more than one page of a folio
(memcpy_from_folio(), memcpy_to_folio(), folio_zero_tail(), etc) all use
folio_test_partial_kmap() instead of folio_test_highmem() as well. Fuse
should use it too.
This is a no-op today since with order-0 folios, offset + count never
exceeds PAGE_SIZE. It matters once a descriptor can span more than one
page, which can happen once fuse enables large folios. Without this
change, fuse_copy_do() would copy past the end of the mapping on a
highmem build with CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP.
Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
