slab: factor out calculate nr objects in cache_estimate
authorJoonsoo Kim <iamjoonsoo.kim@lge.com>
Mon, 2 Dec 2013 08:49:39 +0000 (17:49 +0900)
committerPekka Enberg <penberg@kernel.org>
Sat, 8 Feb 2014 10:10:32 +0000 (12:10 +0200)
This logic is not simple to understand so that making separate function
helping readability. Additionally, we can use this change in the
following patch which implement for freelist to have another sized index
in according to nr objects.

Acked-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
mm/slab.c

diff --cc mm/slab.c
Simple merge