forked from Minki/linux
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>
This commit is contained in:
parent
f102cd8b17
commit
5a423081b2
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user