diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2022-09-02 21:46:08 +0200 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2022-10-03 23:02:46 +0200 |
commit | a4c366f01f10073e0220656561b875627ff7cd90 (patch) | |
tree | 98d57d0a5695396283ce40faefbaf97626d59115 /mm/shmem.c | |
parent | mm/swap: convert __read_swap_cache_async() to use a folio (diff) | |
download | linux-a4c366f01f10073e0220656561b875627ff7cd90.tar.xz linux-a4c366f01f10073e0220656561b875627ff7cd90.zip |
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>
Diffstat (limited to 'mm/shmem.c')
-rw-r--r-- | mm/shmem.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/shmem.c b/mm/shmem.c index 4113f1b9d4a8..ced76c229b96 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -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); |