Skip to content

Commit 3091b61

Browse files
Matthew Wilcox (Oracle)akpm00
authored andcommitted
mm: restore documentation for __free_pages()
The documentation was converted to be for ___free_pages(), which doesn't need documentation as it's static. Link: https://lkml.kernel.org/r/20250604190327.814086-1-willy@infradead.org Fixes: 8c57b68 (mm, bpf: Introduce free_pages_nolock()) Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: Vlastimil Babka <vbabka@suse.cz> Cc: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent d7b8f8e commit 3091b61

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

mm/page_alloc.c

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5028,11 +5028,28 @@ unsigned long get_zeroed_page_noprof(gfp_t gfp_mask)
50285028
}
50295029
EXPORT_SYMBOL(get_zeroed_page_noprof);
50305030

5031+
static void ___free_pages(struct page *page, unsigned int order,
5032+
fpi_t fpi_flags)
5033+
{
5034+
/* get PageHead before we drop reference */
5035+
int head = PageHead(page);
5036+
/* get alloc tag in case the page is released by others */
5037+
struct alloc_tag *tag = pgalloc_tag_get(page);
5038+
5039+
if (put_page_testzero(page))
5040+
__free_frozen_pages(page, order, fpi_flags);
5041+
else if (!head) {
5042+
pgalloc_tag_sub_pages(tag, (1 << order) - 1);
5043+
while (order-- > 0)
5044+
__free_frozen_pages(page + (1 << order), order,
5045+
fpi_flags);
5046+
}
5047+
}
5048+
50315049
/**
5032-
* ___free_pages - Free pages allocated with alloc_pages().
5050+
* __free_pages - Free pages allocated with alloc_pages().
50335051
* @page: The page pointer returned from alloc_pages().
50345052
* @order: The order of the allocation.
5035-
* @fpi_flags: Free Page Internal flags.
50365053
*
50375054
* This function can free multi-page allocations that are not compound
50385055
* pages. It does not check that the @order passed in matches that of
@@ -5049,23 +5066,6 @@ EXPORT_SYMBOL(get_zeroed_page_noprof);
50495066
* Context: May be called in interrupt context or while holding a normal
50505067
* spinlock, but not in NMI context or while holding a raw spinlock.
50515068
*/
5052-
static void ___free_pages(struct page *page, unsigned int order,
5053-
fpi_t fpi_flags)
5054-
{
5055-
/* get PageHead before we drop reference */
5056-
int head = PageHead(page);
5057-
/* get alloc tag in case the page is released by others */
5058-
struct alloc_tag *tag = pgalloc_tag_get(page);
5059-
5060-
if (put_page_testzero(page))
5061-
__free_frozen_pages(page, order, fpi_flags);
5062-
else if (!head) {
5063-
pgalloc_tag_sub_pages(tag, (1 << order) - 1);
5064-
while (order-- > 0)
5065-
__free_frozen_pages(page + (1 << order), order,
5066-
fpi_flags);
5067-
}
5068-
}
50695069
void __free_pages(struct page *page, unsigned int order)
50705070
{
50715071
___free_pages(page, order, FPI_NONE);

0 commit comments

Comments
 (0)