提交 2e08d20d 编写于 作者: D Dennis Zhou 提交者: Tejun Heo

percpu: fix starting offset for chunk statistics traversal

This patch fixes the starting offset used when scanning chunks to
compute the chunk statistics. The value start_offset (and end_offset)
are managed in bytes while the traversal occurs over bits. Thus for the
reserved and dynamic chunk, it may incorrectly skip over the initial
allocations.
Signed-off-by: NDennis Zhou <dennisszhou@gmail.com>
Signed-off-by: NTejun Heo <tj@kernel.org>
上级 e88d62cd
......@@ -73,7 +73,7 @@ static void chunk_map_stats(struct seq_file *m, struct pcpu_chunk *chunk,
last_alloc + 1 : 0;
as_len = 0;
start = chunk->start_offset;
start = chunk->start_offset / PCPU_MIN_ALLOC_SIZE;
/*
* If a bit is set in the allocation map, the bound_map identifies
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册