diff options
| author | Wilson Felipe Pereira <wfelipe@google.com> | 2026-09-04 23:20:47 +0000 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-10-08 22:54:41 -0700 |
| commit | bc82fb61d4891bcae7fdd4411a36aceb51b7f0ca (patch) | |
| tree | 584522e1a1ec1ec2df92762ce24a0c204f83e18e /include/linux | |
| parent | c1b11d76ea9c9ab641afed9ef7df41c31bdde8e1 (diff) | |
mm/zswap: convert zswap_store_page() and zswap_compress() to take a folio
Currently, zswap_store() iterates through a folio and extracts individual
struct page pointers using folio_page() to pass into zswap_store_page()
and zswap_compress().
Pass the folio and the page index directly into these functions instead.
This eliminates the need to materialize struct page pointers inside the
zswap_store() loop and replaces legacy page-based accessors with their
folio equivalents:
- sg_set_page() -> sg_set_folio()
- kmap_local_page() -> kmap_local_folio()
- page_to_nid() -> folio_nid()
- page_swap_entry() -> calculated via folio->swap and index
Link: https://lore.kernel.org/20260904232108.3034333-1-wfelipe@google.com
Signed-off-by: Wilson Felipe Pereira <wfelipe@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Tal Zussman <tz2294@columbia.edu>
Cc: Chengming Zhou <chengming.zhou@linux.dev>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Nhat Pham <nphamcs@gmail.com>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions
