diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2022-09-02 21:46:27 +0200 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2022-10-03 23:02:50 +0200 |
commit | 7459c149ae9ca7d6f241b3a3764aa81b9c405a0e (patch) | |
tree | af4569b64aa2d68db576d6e152ee7d61d910d457 /mm/khugepaged.c | |
parent | shmem: convert shmem_get_link() to use a folio (diff) | |
download | linux-7459c149ae9ca7d6f241b3a3764aa81b9c405a0e.tar.xz linux-7459c149ae9ca7d6f241b3a3764aa81b9c405a0e.zip |
khugepaged: call shmem_get_folio()
shmem_getpage() is being removed, so call its replacement and find the
precise page ourselves.
Link: https://lkml.kernel.org/r/20220902194653.1739778-32-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/khugepaged.c')
-rw-r--r-- | mm/khugepaged.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mm/khugepaged.c b/mm/khugepaged.c index 1e59fe7bfae3..57af2c841b41 100644 --- a/mm/khugepaged.c +++ b/mm/khugepaged.c @@ -1647,13 +1647,16 @@ static int collapse_file(struct mm_struct *mm, struct file *file, } if (xa_is_value(page) || !PageUptodate(page)) { + struct folio *folio; + xas_unlock_irq(&xas); /* swap in or instantiate fallocated page */ - if (shmem_getpage(mapping->host, index, &page, - SGP_NOALLOC)) { + if (shmem_get_folio(mapping->host, index, + &folio, SGP_NOALLOC)) { result = SCAN_FAIL; goto xa_unlocked; } + page = folio_file_page(folio, index); } else if (trylock_page(page)) { get_page(page); xas_unlock_irq(&xas); |