Skip to content

Commit

Permalink
arch/x86: do not explicitly clear Reserved flag in free_pagetable
Browse files Browse the repository at this point in the history
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/[email protected]
Signed-off-by: Oscar Salvador <[email protected]>
Acked-by: David Hildenbrand <[email protected]>
Cc: Dave Hansen <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
  • Loading branch information
osalvadorvilardaga authored and akpm00 committed Jul 4, 2024
1 parent d39b6af commit 7bc131c
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions arch/x86/mm/init_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -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--)
Expand Down

0 comments on commit 7bc131c

Please sign in to comment.