]> git.baikalelectronics.ru Git - kernel.git/commit
slub: Deal with hyperthetical case of PAGE_SIZE > 2M
authorChristoph Lameter <cl@linux.com>
Fri, 20 May 2011 14:42:48 +0000 (09:42 -0500)
committerPekka Enberg <penberg@kernel.org>
Sat, 21 May 2011 09:53:53 +0000 (12:53 +0300)
commit96f7ebd9309e8e13c4d8472b7010d9864d3e7549
tree937d195659cb72bbd038907e36b23e5c0e7c262d
parent8c24c6092a1443b58de3eaf02043961358ed0b78
slub: Deal with hyperthetical case of PAGE_SIZE > 2M

kmalloc_index() currently returns -1 if the PAGE_SIZE is larger than 2M
which seems to cause some concern since the callers do not check for -1.

Insert a BUG() and add a comment to the -1 explaining that the code
cannot be reached.

Signed-off-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
include/linux/slub_def.h