summaryrefslogtreecommitdiff
path: root/mm/percpu-km.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2014-09-02 14:46:02 -0400
committerTejun Heo <tj@kernel.org>2014-09-02 14:46:02 -0400
commita63d4ac4ab6094c051a5a240260d16117a7a2f86 (patch)
tree49a72a515f8bb9a4f83bc68526187da462f20dd8 /mm/percpu-km.c
parenta93ace487a339dccf7040be7fee08c3415188e14 (diff)
downloadlwn-a63d4ac4ab6094c051a5a240260d16117a7a2f86.tar.gz
lwn-a63d4ac4ab6094c051a5a240260d16117a7a2f86.zip
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 <tj@kernel.org> Acked-by: Christoph Lameter <cl@linux.com>
Diffstat (limited to 'mm/percpu-km.c')
-rw-r--r--mm/percpu-km.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mm/percpu-km.c b/mm/percpu-km.c
index a6e34bc1aff4..67a971b7f745 100644
--- a/mm/percpu-km.c
+++ b/mm/percpu-km.c
@@ -67,6 +67,9 @@ static struct pcpu_chunk *pcpu_create_chunk(void)
chunk->data = pages;
chunk->base_addr = page_address(pages) - pcpu_group_offsets[0];
+
+ bitmap_fill(chunk->populated, nr_pages);
+
return chunk;
}