Skip to content

Commit a63d4ac

Browse files
committed
percpu: make percpu-km set chunk->populated bitmap properly
percpu-km instantiates the whole chunk on creation and doesn't make use of chunk->populated bitmap and leaves it as zero. While this currently doesn't cause any problem, the inconsistency makes it difficult to build further logic on top of chunk->populated. This patch makes percpu-km fill chunk->populated on creation so that the bitmap is always consistent. Signed-off-by: Tejun Heo <[email protected]> Acked-by: Christoph Lameter <[email protected]>
1 parent a93ace4 commit a63d4ac

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mm/percpu-km.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ static struct pcpu_chunk *pcpu_create_chunk(void)
6767

6868
chunk->data = pages;
6969
chunk->base_addr = page_address(pages) - pcpu_group_offsets[0];
70+
71+
bitmap_fill(chunk->populated, nr_pages);
72+
7073
return chunk;
7174
}
7275

0 commit comments

Comments
 (0)