summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/memory.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/memory.c b/mm/memory.c
index b36b177e0ea9..0018df3f0cc2 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -3767,9 +3767,9 @@ vm_fault_t do_swap_page(struct vm_fault *vmf)
if (unlikely(!si))
goto out;
- page = lookup_swap_cache(entry, vma, vmf->address);
- if (page)
- folio = page_folio(page);
+ folio = swap_cache_get_folio(entry, vma, vmf->address);
+ if (folio)
+ page = folio_file_page(folio, swp_offset(entry));
swapcache = folio;
if (!folio) {