summaryrefslogtreecommitdiff
path: root/mm/ksm.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2024-04-12 22:35:08 +0300
committerAndrew Morton <akpm@linux-foundation.org>2024-05-06 03:53:47 +0300
commitb650e1d2aefbbb31e7578ad60a0a71bf5e5c5346 (patch)
tree352e571a47f564a9e490891b7ce9d39efd8e817d /mm/ksm.c
parent0edb5b282ac5a4f9b1bdc22120c9b145be315622 (diff)
downloadlinux-b650e1d2aefbbb31e7578ad60a0a71bf5e5c5346.tar.xz
mm/memory-failure: pass the folio to collect_procs_ksm()
We've already calculated it, so pass it in instead of recalculating it in collect_procs_ksm(). Link: https://lkml.kernel.org/r/20240412193510.2356957-12-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Jane Chu <jane.chu@oracle.com> Reviewed-by: Miaohe Lin <linmiaohe@huawei.com> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Miaohe Lin <linmiaohe@huawei.com> Cc: Oscar Salvador <osalvador@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/ksm.c')
-rw-r--r--mm/ksm.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/mm/ksm.c b/mm/ksm.c
index 159604ad4779..e1034bf1c937 100644
--- a/mm/ksm.c
+++ b/mm/ksm.c
@@ -3178,12 +3178,11 @@ again:
/*
* Collect processes when the error hit an ksm page.
*/
-void collect_procs_ksm(struct page *page, struct list_head *to_kill,
- int force_early)
+void collect_procs_ksm(struct folio *folio, struct page *page,
+ struct list_head *to_kill, int force_early)
{
struct ksm_stable_node *stable_node;
struct ksm_rmap_item *rmap_item;
- struct folio *folio = page_folio(page);
struct vm_area_struct *vma;
struct task_struct *tsk;