Skip to content

Commit 33d7f15

Browse files
Matthew Wilcox (Oracle)akpm00
authored andcommitted
mm: use page->private instead of page->index in percpu
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>
1 parent 544ec0e commit 33d7f15

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mm/percpu.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,13 +253,13 @@ static int pcpu_chunk_slot(const struct pcpu_chunk *chunk)
253253
/* set the pointer to a chunk in a page struct */
254254
static void pcpu_set_page_chunk(struct page *page, struct pcpu_chunk *pcpu)
255255
{
256-
page->index = (unsigned long)pcpu;
256+
page->private = (unsigned long)pcpu;
257257
}
258258

259259
/* obtain pointer to a chunk from a page struct */
260260
static struct pcpu_chunk *pcpu_get_page_chunk(struct page *page)
261261
{
262-
return (struct pcpu_chunk *)page->index;
262+
return (struct pcpu_chunk *)page->private;
263263
}
264264

265265
static int __maybe_unused pcpu_page_idx(unsigned int cpu, int page_idx)

0 commit comments

Comments
 (0)