Skip to content

Use nth_page() in place of direct struct page manipulation

Zi Yan linux-mips linux-mm lkml stable 3 versions – Applied

Status from this message: [merged mm-stable] mips-use-nth_page-in-place-of-direct-struct-page-manipulation.patch removed from -mm tree

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest5 patches 7 repliesApplied 5/5
  2. v25 patches 5 repliesSuperseded
  3. v13 patches 4 repliesSuperseded

Changes in v3 from the cover letter

1. Fixed the subject and the commit log of Patch 3 (David Hildenbrand)

Patches in v3 All 5 applied

#Subject and filesSizeRepliesApplied
1/5mm/cma: use nth_page() in place of direct struct page manipulation.mm/cma.c+1 -12 repliesApplied
2/5mm/hugetlb: use nth_page() in place of direct struct page manipulation.mm/hugetlb.c+1 -11 replyApplied
3/5mm/memory_hotplug: use pfn math in place of direct struct page manipulation.mm/memory_hotplug.c+1 -11 replyApplied
4/5fs: use nth_page() in place of direct struct page manipulation.fs/hugetlbfs/inode.c+2 -21 replyApplied
5/5mips: use nth_page() in place of direct struct page manipulation.arch/mips/mm/cache.c+1 -11 replyApplied

Reviews trailers per patch

4 of 5 patches have a Reviewed-by or Acked-by.

PatchMuchun SongDavid Hildenbrand
1/5R-b
2/5R-b
3/5R-b A-b
4/5R-b
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/5] Use nth_page() in place of direct struct page manipulation

From: Zi Yan <[email protected]>

On SPARSEMEM without VMEMMAP, struct page is not guaranteed to be contiguous, since each memory section's memmap might be allocated independently. hugetlb pages can go beyond a memory section size, thus direct struct page manipulation on hugetlb pages/subpages might give wrong struct page. Kernel provides nth_page() to do the manipulation properly. Use that whenever code can see hugetlb pages.

The patches are on top of next-20230913

Changes:

From v2:
1. Fixed the subject and the commit log of Patch 3 (David Hildenbrand)

From v1:
1. Separated first patch into three and add Fixes for better backport.

Zi Yan (5):
mm/cma: use nth_page() in place of direct struct page manipulation. mm/hugetlb: use nth_page() in place of direct struct page
manipulation.
mm/memory_hotplug: use pfn math in place of direct struct page
manipulation.
fs: use nth_page() in place of direct struct page manipulation.
mips: use nth_page() in place of direct struct page manipulation.

 arch/mips/mm/cache.c | 2 +-
 fs/hugetlbfs/inode.c | 4 ++--
 mm/cma.c             | 2 +-
 mm/hugetlb.c         | 2 +-
 mm/memory_hotplug.c  | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)
Signature · 1 line
2.40.1