mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
mm/swap: convert __put_single_page() to __folio_put_small()
Saves 56 bytes of text by removing a call to compound_head(). Link: https://lkml.kernel.org/r/20220617175020.717127-17-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
8d29c7036f
commit
83d9965995
1 changed files with 5 additions and 5 deletions
10
mm/swap.c
10
mm/swap.c
|
@ -99,11 +99,11 @@ static void __page_cache_release(struct page *page)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __put_single_page(struct page *page)
|
static void __folio_put_small(struct folio *folio)
|
||||||
{
|
{
|
||||||
__page_cache_release(page);
|
__page_cache_release(&folio->page);
|
||||||
mem_cgroup_uncharge(page_folio(page));
|
mem_cgroup_uncharge(folio);
|
||||||
free_unref_page(page, 0);
|
free_unref_page(&folio->page, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __put_compound_page(struct page *page)
|
static void __put_compound_page(struct page *page)
|
||||||
|
@ -126,7 +126,7 @@ void __folio_put(struct folio *folio)
|
||||||
else if (unlikely(folio_test_large(folio)))
|
else if (unlikely(folio_test_large(folio)))
|
||||||
__put_compound_page(&folio->page);
|
__put_compound_page(&folio->page);
|
||||||
else
|
else
|
||||||
__put_single_page(&folio->page);
|
__folio_put_small(folio);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(__folio_put);
|
EXPORT_SYMBOL(__folio_put);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue