]> 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>
Thu, 7 Nov 2024 22:38:07 +0000 (14:38 -0800)
commitf7470591f8db1a72ce9f7ab49cb13c2b21b92002
tree74216b10aff78c9bcd324f438b9b911f3a9d1a69
parente664c2cd98cbf5e6fcc3ee92b5f3fc8f7f35e11e
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