]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mm: use page->private instead of page->index in percpu
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Sat, 5 Oct 2024 20:01:18 +0000 (21:01 +0100)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 1 Nov 2024 04:29:03 +0000 (21:29 -0700)
The percpu allocator only uses one field in struct page, just change it
from page->index to page->private.

Link: https://lkml.kernel.org/r/20241005200121.3231142-8-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/percpu.c

index d1a73cf65c53242837bb97339a9debbc7d4ebf55..d8dd31a2e407da33f7a6d8d56eb894a91c7b2b90 100644 (file)
@@ -253,13 +253,13 @@ static int pcpu_chunk_slot(const struct pcpu_chunk *chunk)
 /* set the pointer to a chunk in a page struct */
 static void pcpu_set_page_chunk(struct page *page, struct pcpu_chunk *pcpu)
 {
-       page->index = (unsigned long)pcpu;
+       page->private = (unsigned long)pcpu;
 }
 
 /* obtain pointer to a chunk from a page struct */
 static struct pcpu_chunk *pcpu_get_page_chunk(struct page *page)
 {
-       return (struct pcpu_chunk *)page->index;
+       return (struct pcpu_chunk *)page->private;
 }
 
 static int __maybe_unused pcpu_page_idx(unsigned int cpu, int page_idx)