From: Qi Zheng Date: Wed, 5 Apr 2023 16:18:54 +0000 (+0800) Subject: mm: mlock: use folios_put() in mlock_folio_batch() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=2bd7f621130b47cab8bed82234cac1f9f105efb7;p=linux.git 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 Acked-by: Mel Gorman Cc: Lorenzo Stoakes Cc: Matthew Wilcox (Oracle) Cc: Vlastimil Babka Signed-off-by: Andrew Morton --- diff --git a/mm/mlock.c b/mm/mlock.c index 617469fce96d2..40b43f8740dfb 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); }