mm/slab: Fix drain freelist excessively
authorWanpeng Li <liwanp@linux.vnet.ibm.com>
Thu, 4 Jul 2013 00:33:22 +0000 (08:33 +0800)
committerPekka Enberg <penberg@kernel.org>
Sun, 7 Jul 2013 15:37:46 +0000 (18:37 +0300)
commit0fa8103be4c20f893486c533e4c6dfbc5ccddeb4
tree890b6eb373acf23232c6f05fdd5fb90ea511c83b
parent069e2b351de67e7a837b15b3d26c65c19b790cc3
mm/slab: Fix drain freelist excessively

The drain_freelist is called to drain slabs_free lists for cache reap,
cache shrink, memory hotplug callback etc. The tofree parameter should
be the number of slab to free instead of the number of slab objects to
free.

This patch fix the callers that pass # of objects. Make sure they pass #
of slabs.

Acked-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
mm/slab.c