]> git.baikalelectronics.ru Git - kernel.git/commit
percpu: move chunk area map extension out of area allocation
authorTejun Heo <tj@kernel.org>
Fri, 6 Mar 2009 15:44:09 +0000 (00:44 +0900)
committerTejun Heo <tj@kernel.org>
Fri, 6 Mar 2009 15:44:09 +0000 (00:44 +0900)
commitdd5e515fea52e8d4af301096acff3332141766fc
tree9e8b07047080fbdb4f4c8f1554d5208570e64fe2
parent7949cdccde99f9d445ca4e32118f71b11a893b93
percpu: move chunk area map extension out of area allocation

Impact: code reorganization for later changes

Separate out chunk area map extension into a separate function -
pcpu_extend_area_map() - and call it directly from pcpu_alloc() such
that pcpu_alloc_area() is guaranteed to have enough area map slots on
invocation.

With this change, pcpu_alloc_area() does only area allocation and the
only failure mode is when the chunk doens't have enough room, so
there's no need to distinguish it from memory allocation failures.
Make it return -1 on such cases instead of hacky -ENOSPC.

Signed-off-by: Tejun Heo <tj@kernel.org>
mm/percpu.c