Commit 982a7194 authored by Matthew Wilcox (Oracle)'s avatar Matthew Wilcox (Oracle) Committed by Andrew Morton

mm: add __folio_batch_release()

This performs the same role as __pagevec_release(), ie skipping the check
for batch length of 0.

Link: https://lkml.kernel.org/r/20230621164557.3510324-3-willy@infradead.orgSigned-off-by: default avatarMatthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent f5f288a0
......@@ -127,9 +127,15 @@ static inline unsigned folio_batch_add(struct folio_batch *fbatch,
return fbatch_space(fbatch);
}
static inline void __folio_batch_release(struct folio_batch *fbatch)
{
__pagevec_release((struct pagevec *)fbatch);
}
static inline void folio_batch_release(struct folio_batch *fbatch)
{
pagevec_release((struct pagevec *)fbatch);
if (folio_batch_count(fbatch))
__folio_batch_release(fbatch);
}
void folio_batch_remove_exceptionals(struct folio_batch *fbatch);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment