diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2022-09-02 22:46:33 +0300 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2022-10-04 00:02:51 +0300 |
commit | 5a423081b2465d38baf2fcbbc19f77d211507061 (patch) | |
tree | ca85f9fa4be74b5e03346386cce8bcdfc62393bd /mm/memory.c | |
parent | f102cd8b173e066179b472fb6e3b18e31a1cc394 (diff) | |
download | linux-5a423081b2465d38baf2fcbbc19f77d211507061.tar.xz |
mm: convert do_swap_page() to use swap_cache_get_folio()
Saves a folio->page->folio conversion.
Link: https://lkml.kernel.org/r/20220902194653.1739778-38-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.c')
-rw-r--r-- | mm/memory.c | 6 |
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) { |