summaryrefslogtreecommitdiff
path: root/mm/rmap.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2024-03-26 17:10:28 +0000
committerAndrew Morton <akpm@linux-foundation.org>2024-04-25 20:56:14 -0700
commitb84fd2835c70e0149e2522fd746d3fb7049a1e19 (patch)
treec871a7024d1cea7c88edfbc994bd691d1e6646d5 /mm/rmap.c
parent2ace5a670e2a0f3a6029bc6cf91dc14202074e7a (diff)
mm: make page_mapped() take a const argument
None of the functions called by page_mapped() modify the page or folio, so mark them all as const. Link: https://lkml.kernel.org/r/20240326171045.410737-7-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/rmap.c')
-rw-r--r--mm/rmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/rmap.c b/mm/rmap.c
index 3746a5531018..d52759aa3ff7 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -1134,7 +1134,7 @@ int pfn_mkclean_range(unsigned long pfn, unsigned long nr_pages, pgoff_t pgoff,
return page_vma_mkclean_one(&pvmw);
}
-int folio_total_mapcount(struct folio *folio)
+int folio_total_mapcount(const struct folio *folio)
{
int mapcount = folio_entire_mapcount(folio);
int nr_pages;