mm: prefer xxx_page() alloc/free functions for order-0 pages

Update instances of alloc_pages(..., 0), __get_free_pages(..., 0) and
__free_pages(..., 0) to use alloc_page(), __get_free_page() and
__free_page() respectively in core code.

Link: https://lkml.kernel.org/r/50c48ca4789f1da2a65795f2346f5ae3eff7d665.1678710232.git.lstoakes@gmail.com
Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Mike Rapoport (IBM) <rppt@kernel.org>
Acked-by: Mel Gorman <mgorman@techsingularity.net>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Uladzislau Rezki (Sony) <urezki@gmail.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
Lorenzo Stoakes
2023-03-13 12:27:14 +00:00
committed by Andrew Morton
parent 0a54864f8d
commit dcc1be1190
6 changed files with 8 additions and 8 deletions

View File

@@ -1048,7 +1048,7 @@ static void __init destroy_args(struct pgtable_debug_args *args)
if (args->pte_pfn != ULONG_MAX) {
page = pfn_to_page(args->pte_pfn);
__free_pages(page, 0);
__free_page(page);
args->pte_pfn = ULONG_MAX;
}
@@ -1290,7 +1290,7 @@ static int __init init_args(struct pgtable_debug_args *args)
}
}
page = alloc_pages(GFP_KERNEL, 0);
page = alloc_page(GFP_KERNEL);
if (page)
args->pte_pfn = page_to_pfn(page);