mm/swap: convert add_to_swap_cache() to take a folio
With all callers using folios, we can convert add_to_swap_cache() to take a folio and use it throughout. Link: https://lkml.kernel.org/r/20220902194653.1739778-13-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
a0d3374b07
commit
a4c366f01f
3 changed files with 20 additions and 20 deletions
|
|
@ -1406,7 +1406,7 @@ static int shmem_writepage(struct page *page, struct writeback_control *wbc)
|
|||
if (list_empty(&info->swaplist))
|
||||
list_add(&info->swaplist, &shmem_swaplist);
|
||||
|
||||
if (add_to_swap_cache(&folio->page, swap,
|
||||
if (add_to_swap_cache(folio, swap,
|
||||
__GFP_HIGH | __GFP_NOMEMALLOC | __GFP_NOWARN,
|
||||
NULL) == 0) {
|
||||
spin_lock_irq(&info->lock);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue