summaryrefslogtreecommitdiff
path: root/mm/memory-failure.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2024-10-05 21:01:14 +0100
committerAndrew Morton <akpm@linux-foundation.org>2024-11-07 14:38:07 -0800
commit713da0b33b3e9d16272b57f4c44dee5c052be9b7 (patch)
treef14ecf143015a993a9bdecad7d5e434d962b9c84 /mm/memory-failure.c
parent7d3e93eca3ca28bb5927b09b9b603c0c995bcd24 (diff)
mm: renovate page_address_in_vma()
This function doesn't modify any of its arguments, so if we make a few other functions take const pointers, we can make page_address_in_vma() take const pointers too. All of its callers have the containing folio already, so pass that in as an argument instead of recalculating it. Also add kernel-doc Link: https://lkml.kernel.org/r/20241005200121.3231142-4-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/memory-failure.c')
-rw-r--r--mm/memory-failure.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index 58a3d80961a4..ea9d883c01c1 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -671,7 +671,7 @@ static void collect_procs_file(struct folio *folio, struct page *page,
*/
if (vma->vm_mm != t->mm)
continue;
- addr = page_address_in_vma(page, vma);
+ addr = page_address_in_vma(folio, page, vma);
add_to_kill_anon_file(t, page, vma, to_kill, addr);
}
}