diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2024-10-05 22:01:13 +0200 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2024-11-07 23:38:07 +0100 |
commit | 7d3e93eca3ca28bb5927b09b9b603c0c995bcd24 (patch) | |
tree | d44920fbe06bd7ea5492b01188afc8c47537c03c /mm/page_vma_mapped.c | |
parent | mm: convert page_to_pgoff() to page_pgoff() (diff) | |
download | linux-7d3e93eca3ca28bb5927b09b9b603c0c995bcd24.tar.xz linux-7d3e93eca3ca28bb5927b09b9b603c0c995bcd24.zip |
mm: use page_pgoff() in more places
There are several places which currently open-code page_pgoff(), convert
them to call it.
Link: https://lkml.kernel.org/r/20241005200121.3231142-3-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/page_vma_mapped.c')
-rw-r--r-- | mm/page_vma_mapped.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/page_vma_mapped.c b/mm/page_vma_mapped.c index ab1671e71cb2..6b356853c04e 100644 --- a/mm/page_vma_mapped.c +++ b/mm/page_vma_mapped.c @@ -340,7 +340,6 @@ next_pte: unsigned long page_mapped_in_vma(struct page *page, struct vm_area_struct *vma) { struct folio *folio = page_folio(page); - pgoff_t pgoff = folio->index + folio_page_idx(folio, page); struct page_vma_mapped_walk pvmw = { .pfn = page_to_pfn(page), .nr_pages = 1, @@ -348,7 +347,7 @@ unsigned long page_mapped_in_vma(struct page *page, struct vm_area_struct *vma) .flags = PVMW_SYNC, }; - pvmw.address = vma_address(vma, pgoff, 1); + pvmw.address = vma_address(vma, page_pgoff(folio, page), 1); if (pvmw.address == -EFAULT) goto out; if (!page_vma_mapped_walk(&pvmw)) |