]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm: convert page_to_pgoff() to page_pgoff()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Sat, 5 Oct 2024 20:01:12 +0000 (21:01 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 1 Nov 2024 04:29:01 +0000 (21:29 -0700)
commit4b0b4a842e4da9eeb2f01047c65f6a6f440e0846
tree609798fcb10d70a4645d974c353223d306795d9f
parentbdf1bfcade19e343cc6f000efb16b2a33638d29a
mm: convert page_to_pgoff() to page_pgoff()

Patch series "page->index removals in mm", v2.

As part of shrinking struct page, we need to stop using page->index.  This
patchset gets rid of most of the remaining references to page->index in
mm, as well as increasing the number of functions which take a const
folio/page pointer.  It shrinks the text segment of mm by a few hundred
bytes in my test config, probably mostly from removing calls to
compound_head() in page_to_pgoff().

This patch (of 7):

Change the function signature to pass in the folio as all three callers
have it.  This removes a reference to page->index, which we're trying to
get rid of.  And add kernel-doc.

Link: https://lkml.kernel.org/r/20241005200121.3231142-1-willy@infradead.org
Link: https://lkml.kernel.org/r/20241005200121.3231142-2-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/mm.h
include/linux/pagemap.h
mm/memory-failure.c
mm/rmap.c