aboutsummaryrefslogtreecommitdiffstats
path: root/mm/sparse.c
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <[email protected]>2021-10-04 13:46:48 +0000
committerVlastimil Babka <[email protected]>2022-01-06 11:27:03 +0000
commitc5e97ed154589524a1df4ae2be55c4cfdb0d0573 (patch)
tree95cb494d3206da298e780e77ad9a8699d21548b6 /mm/sparse.c
parentzsmalloc: Stop using slab fields in struct page (diff)
downloadkernel-c5e97ed154589524a1df4ae2be55c4cfdb0d0573.tar.gz
kernel-c5e97ed154589524a1df4ae2be55c4cfdb0d0573.zip
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) <[email protected]> Signed-off-by: Vlastimil Babka <[email protected]> Acked-by: Johannes Weiner <[email protected]> Cc: Dave Hansen <[email protected]> Cc: Andy Lutomirski <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: <[email protected]> Cc: "H. Peter Anvin" <[email protected]>
Diffstat (limited to 'mm/sparse.c')
-rw-r--r--mm/sparse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/sparse.c b/mm/sparse.c
index e5c84b0cf0c9..d21c6e5910d0 100644
--- a/mm/sparse.c
+++ b/mm/sparse.c
@@ -722,7 +722,7 @@ static void free_map_bootmem(struct page *memmap)
>> PAGE_SHIFT;
for (i = 0; i < nr_pages; i++, page++) {
- magic = (unsigned long) page->freelist;
+ magic = page->index;
BUG_ON(magic == NODE_INFO);