]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
mm: restore documentation for __free_pages()
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Wed, 4 Jun 2025 19:03:26 +0000 (20:03 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 10 Jul 2025 05:41:52 +0000 (22:41 -0700)
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: 8c57b687e833 (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>
mm/page_alloc.c

index 2ef3c07266b34dfa516d6d564801023d25f71715..31041e2aa33a7e0d58b5046be4b502c5f9dda321 100644 (file)
@@ -5028,11 +5028,28 @@ unsigned long get_zeroed_page_noprof(gfp_t gfp_mask)
 }
 EXPORT_SYMBOL(get_zeroed_page_noprof);
 
+static void ___free_pages(struct page *page, unsigned int order,
+                         fpi_t fpi_flags)
+{
+       /* get PageHead before we drop reference */
+       int head = PageHead(page);
+       /* get alloc tag in case the page is released by others */
+       struct alloc_tag *tag = pgalloc_tag_get(page);
+
+       if (put_page_testzero(page))
+               __free_frozen_pages(page, order, fpi_flags);
+       else if (!head) {
+               pgalloc_tag_sub_pages(tag, (1 << order) - 1);
+               while (order-- > 0)
+                       __free_frozen_pages(page + (1 << order), order,
+                                           fpi_flags);
+       }
+}
+
 /**
- * ___free_pages - Free pages allocated with alloc_pages().
+ * __free_pages - Free pages allocated with alloc_pages().
  * @page: The page pointer returned from alloc_pages().
  * @order: The order of the allocation.
- * @fpi_flags: Free Page Internal flags.
  *
  * This function can free multi-page allocations that are not compound
  * pages.  It does not check that the @order passed in matches that of
@@ -5049,23 +5066,6 @@ EXPORT_SYMBOL(get_zeroed_page_noprof);
  * Context: May be called in interrupt context or while holding a normal
  * spinlock, but not in NMI context or while holding a raw spinlock.
  */
-static void ___free_pages(struct page *page, unsigned int order,
-                         fpi_t fpi_flags)
-{
-       /* get PageHead before we drop reference */
-       int head = PageHead(page);
-       /* get alloc tag in case the page is released by others */
-       struct alloc_tag *tag = pgalloc_tag_get(page);
-
-       if (put_page_testzero(page))
-               __free_frozen_pages(page, order, fpi_flags);
-       else if (!head) {
-               pgalloc_tag_sub_pages(tag, (1 << order) - 1);
-               while (order-- > 0)
-                       __free_frozen_pages(page + (1 << order), order,
-                                           fpi_flags);
-       }
-}
 void __free_pages(struct page *page, unsigned int order)
 {
        ___free_pages(page, order, FPI_NONE);