summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQi Zheng <zhengqi.arch@bytedance.com>2023-04-05 18:18:54 +0200
committerAndrew Morton <akpm@linux-foundation.org>2023-04-19 01:29:53 +0200
commit2bd7f621130b47cab8bed82234cac1f9f105efb7 (patch)
treead9b7e0187173d6d8147e9c82213ab72c2bc3741
parentprctl: add PR_GET_AUXV to copy auxv to userspace (diff)
downloadlinux-2bd7f621130b47cab8bed82234cac1f9f105efb7.tar.xz
linux-2bd7f621130b47cab8bed82234cac1f9f105efb7.zip
mm: mlock: use folios_put() in mlock_folio_batch()
Since we have updated mlock to use folios, it's better to call folios_put() instead of calling release_pages() directly. Link: https://lkml.kernel.org/r/20230405161854.6931-2-zhengqi.arch@bytedance.com Signed-off-by: Qi Zheng <zhengqi.arch@bytedance.com> Acked-by: Mel Gorman <mgorman@suse.de> Cc: Lorenzo Stoakes <lstoakes@gmail.com> Cc: Matthew Wilcox (Oracle) <willy@infradead.org> Cc: Vlastimil Babka <vbabka@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r--mm/mlock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/mlock.c b/mm/mlock.c
index 617469fce96d..40b43f8740df 100644
--- a/mm/mlock.c
+++ b/mm/mlock.c
@@ -206,7 +206,7 @@ static void mlock_folio_batch(struct folio_batch *fbatch)
if (lruvec)
unlock_page_lruvec_irq(lruvec);
- release_pages(fbatch->folios, fbatch->nr);
+ folios_put(fbatch->folios, folio_batch_count(fbatch));
folio_batch_reinit(fbatch);
}