diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2021-10-04 16:46:48 +0300 |
---|---|---|
committer | Vlastimil Babka <vbabka@suse.cz> | 2022-01-06 14:27:03 +0300 |
commit | c5e97ed154589524a1df4ae2be55c4cfdb0d0573 (patch) | |
tree | 95cb494d3206da298e780e77ad9a8699d21548b6 /include/linux/bootmem_info.h | |
parent | ffedd09fa9b06d0d79e123bbf4ec81125456d982 (diff) | |
download | linux-c5e97ed154589524a1df4ae2be55c4cfdb0d0573.tar.xz |
bootmem: Use page->index instead of page->freelist
page->freelist is for the use of slab. Using page->index is the same
set of bits as page->freelist, and by using an integer instead of a
pointer, we can avoid casts.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: <x86@kernel.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Diffstat (limited to 'include/linux/bootmem_info.h')
-rw-r--r-- | include/linux/bootmem_info.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/bootmem_info.h b/include/linux/bootmem_info.h index 2bc8b1f69c93..cc35d010fa94 100644 --- a/include/linux/bootmem_info.h +++ b/include/linux/bootmem_info.h @@ -30,7 +30,7 @@ void put_page_bootmem(struct page *page); */ static inline void free_bootmem_page(struct page *page) { - unsigned long magic = (unsigned long)page->freelist; + unsigned long magic = page->index; /* * The reserve_bootmem_region sets the reserved flag on bootmem |