mirror of
https://github.com/torvalds/linux.git
synced 2025-11-30 23:16:01 +07:00
mm/mm/percpu-km: drop nth_page() usage within single allocation
We're allocating a higher-order page from the buddy. For these pages (that are guaranteed to not exceed a single memory section) there is no need to use nth_page(). Link: https://lkml.kernel.org/r/20250901150359.867252-15-david@redhat.com Signed-off-by: David Hildenbrand <david@redhat.com> Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> Acked-by: Liam R. Howlett <Liam.Howlett@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
committed by
Andrew Morton
parent
372c9b5491
commit
cb77aa60a0
@@ -69,7 +69,7 @@ static struct pcpu_chunk *pcpu_create_chunk(gfp_t gfp)
|
||||
}
|
||||
|
||||
for (i = 0; i < nr_pages; i++)
|
||||
pcpu_set_page_chunk(nth_page(pages, i), chunk);
|
||||
pcpu_set_page_chunk(pages + i, chunk);
|
||||
|
||||
chunk->data = pages;
|
||||
chunk->base_addr = page_address(pages);
|
||||
|
||||
Reference in New Issue
Block a user