mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
mm/swap: convert __put_page() to __folio_put()
Saves 11 bytes of text by removing a check of PageTail. Link: https://lkml.kernel.org/r/20220617175020.717127-16-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
2f58e5de66
commit
8d29c7036f
3 changed files with 11 additions and 11 deletions
14
mm/swap.c
14
mm/swap.c
|
@ -119,16 +119,16 @@ static void __put_compound_page(struct page *page)
|
|||
destroy_compound_page(page);
|
||||
}
|
||||
|
||||
void __put_page(struct page *page)
|
||||
void __folio_put(struct folio *folio)
|
||||
{
|
||||
if (unlikely(is_zone_device_page(page)))
|
||||
free_zone_device_page(page);
|
||||
else if (unlikely(PageCompound(page)))
|
||||
__put_compound_page(page);
|
||||
if (unlikely(folio_is_zone_device(folio)))
|
||||
free_zone_device_page(&folio->page);
|
||||
else if (unlikely(folio_test_large(folio)))
|
||||
__put_compound_page(&folio->page);
|
||||
else
|
||||
__put_single_page(page);
|
||||
__put_single_page(&folio->page);
|
||||
}
|
||||
EXPORT_SYMBOL(__put_page);
|
||||
EXPORT_SYMBOL(__folio_put);
|
||||
|
||||
/**
|
||||
* put_pages_list() - release a list of pages
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue