From: Oscar Salvador Date: Mon, 27 May 2024 04:45:23 +0000 (+0200) Subject: arch/x86: do not explicitly clear Reserved flag in free_pagetable X-Git-Tag: v6.11-rc1~85^2~336 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7bc131c56853cd6c1d51d8cfc1befc0a23278395;p=thirdparty%2Flinux.git arch/x86: do not explicitly clear Reserved flag in free_pagetable In free_pagetable() we use the non-atomic version for clearing the PageReserved bit from the page. free_pagetable() will either call free_reserved_page() or put_page_bootmem(), which will eventually end up calling free_reserved_page(), and in there we already clear the PageReserved flag. Link: https://lkml.kernel.org/r/20240527044523.29207-1-osalvador@suse.de Signed-off-by: Oscar Salvador Acked-by: David Hildenbrand Cc: Dave Hansen Signed-off-by: Andrew Morton --- diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index adec42928ec1f..8f6b14003ff2c 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c @@ -980,8 +980,6 @@ static void __meminit free_pagetable(struct page *page, int order) /* bootmem page has reserved flag */ if (PageReserved(page)) { - __ClearPageReserved(page); - magic = page->index; if (magic == SECTION_INFO || magic == MIX_SECTION_INFO) { while (nr_pages--)