diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2024-02-27 18:42:38 +0100 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2024-03-05 02:01:23 +0100 |
commit | 6871cc5742f411bf8ebbcb78b4afeb992d888228 (patch) | |
tree | 2ac30b31c97955e56d6223e76e1f98b2a03d1d9d /mm/swap.c | |
parent | mm: add free_unref_folios() (diff) | |
download | linux-6871cc5742f411bf8ebbcb78b4afeb992d888228.tar.xz linux-6871cc5742f411bf8ebbcb78b4afeb992d888228.zip |
mm: use folios_put() in __folio_batch_release()
There's no need to indirect through release_pages() and iterate over this
batch of folios an extra time; we can just use the batch that we have.
Link: https://lkml.kernel.org/r/20240227174254.710559-5-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Ryan Roberts <ryan.roberts@arm.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Mel Gorman <mgorman@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/swap.c')
-rw-r--r-- | mm/swap.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/swap.c b/mm/swap.c index 3d51f8c72017..1cfb7b897ebd 100644 --- a/mm/swap.c +++ b/mm/swap.c @@ -1083,8 +1083,7 @@ void __folio_batch_release(struct folio_batch *fbatch) lru_add_drain(); fbatch->percpu_pvec_drained = true; } - release_pages(fbatch->folios, folio_batch_count(fbatch)); - folio_batch_reinit(fbatch); + folios_put(fbatch); } EXPORT_SYMBOL(__folio_batch_release); |