Skip to content

mm, swap: clean up swap cache mapping helper

Kairui Song linux-btrfs linux-f2fs-devel linux-fsdevel linux-mm lkml 3 versions – Applied

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest6 patches 12 repliesApplied 6/6
  2. v26 patches 6 repliesSuperseded 1 of 6 applied
  3. v16 patches 15 repliesSuperseded 1 of 6 applied

Changes from the cover letter

- Collect Reviewed-by.
- Fix a build bot error.
- Slightly update commit messages to cover a few review concerns.

Patches in v3 All 6 applied

#Subject and filesSizeRepliesApplied
1/6fuse: drop usage of folio_indexfs/fuse/file.c+2 -21 replyApplied
2/6btrfs: drop usage of folio_indexfs/btrfs/extent_io.c+1 -16 repliesApplied
3/6f2fs: drop usage of folio_indexfs/f2fs/data.c fs/f2fs/inline.c fs/f2fs/super.c+5 -52 repliesApplied
4/6filemap: do not use folio_contains for swap cache foliosinclude/linux/pagemap.h+4 -41 replyApplied
5/6mm: move folio_index to mm/swap.h and remove no longer needed helperinclude/linux/pagemap.h mm/gup.c mm/memfd.c +4 more+22 -262 repliesApplied
6/6mm, swap: remove no longer used swap mapping helperinclude/linux/pagemap.h mm/swapfile.c+0 -100 repliesApplied

Reviews trailers per patch

All 6 patches have a Reviewed-by or Acked-by.

PatchMatthew Wilcox (Oracle)Qu WenruoDavid HildenbrandChao Yu
1/6R-b R-b
2/6R-b R-b R-b
3/6R-b R-b R-b
4/6A-b
5/6A-b
6/6R-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v3 thread

Cover letter [PATCH v3 0/6] mm, swap: clean up swap cache mapping helper

From: Kairui Song <[email protected]>

This series removes usage of folio_index usage in fs/, and remove swap cache checking in folio_contains.

Currently, the swap cache is already no longer directly exposed to fs, and swap cache will be more different from page cache. Clean up the helpers first to simplify the code and eliminate the helpers used for resolving circular header dependency issue between filemap and swap headers, and prepare for further changes.

---

V1: https://lore.kernel.org/linux-mm/[email protected]/
Changes:
- Collect Reviewed-by.
- Fix a build bot error.
- Slightly update commit messages to cover a few review concerns.

V2: https://lore.kernel.org/linux-mm/[email protected]/
Changes:
- Collect Acked-by.
- VM_BUG_ON to VM_WARN_ON and minor code style update.

Kairui Song (6):
fuse: drop usage of folio_index
btrfs: drop usage of folio_index
f2fs: drop usage of folio_index
filemap: do not use folio_contains for swap cache folios
mm: move folio_index to mm/swap.h and remove no longer needed helper mm, swap: remove no longer used swap mapping helper

 fs/btrfs/extent_io.c    |  2 +-
 fs/f2fs/data.c          |  4 ++--
 fs/f2fs/inline.c        |  4 ++--
 fs/f2fs/super.c         |  2 +-
 fs/fuse/file.c          |  4 ++--
 include/linux/pagemap.h | 29 ++++-------------------------
 mm/gup.c                |  1 +
 mm/memfd.c              |  1 +
 mm/migrate.c            |  1 +
 mm/page-writeback.c     |  1 +
 mm/swap.h               | 18 ++++++++++++++++++
 mm/swapfile.c           | 15 ---------------
 12 files changed, 34 insertions(+), 48 deletions(-)
Signature · 1 line
2.49.0