Skip to content

Commit

Permalink
mm: mlock: use folios_put() in mlock_folio_batch()
Browse files Browse the repository at this point in the history
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/[email protected]
Signed-off-by: Qi Zheng <[email protected]>
Acked-by: Mel Gorman <[email protected]>
Cc: Lorenzo Stoakes <[email protected]>
Cc: Matthew Wilcox (Oracle) <[email protected]>
Cc: Vlastimil Babka <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
  • Loading branch information
Qi Zheng authored and akpm00 committed Apr 18, 2023
1 parent ddc6597 commit 2bd7f62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/mlock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 2bd7f62

Please sign in to comment.