slub: fix handling of oversized slabs
authorAndrew Morton <akpm@linux-foundation.org>
Thu, 17 May 2007 05:10:54 +0000 (22:10 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 17 May 2007 12:23:03 +0000 (05:23 -0700)
commitade3aff25fb2dce76e2a9b53e1334bd0a174f739
treea10770c6eb13c6c6dc9b74d208fc25e66aafc3f1
parent0b44f7a5b5078d737b3f5914978aabb761254840
slub: fix handling of oversized slabs

I'm getting zillions of undefined references to __kmalloc_size_too_large on
alpha.  For some reason alpha is building out-of-line copies of kmalloc_slab()
into lots of compilation units.

It turns out that gcc just isn't smart enough to work out that
__builtin_contant_p(size)==true implies that __builtin_contant_p(index)==true.

So let's give it a bit of help.

Cc: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/slub_def.h