[PATCH] revert oversized kmalloc check

As davem points out, this wasn't such a great idea. There may be some code
which does:

size = 1024*1024;
while (kmalloc(size, ...) == 0)
size /= 2;

which will now explode.

Cc: "David S. Miller" <davem@davemloft.net>
Cc: Christoph Lameter <christoph@lameter.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by Andrew Morton and committed by Linus Torvalds dbdb9045 86513e72

+2 -1
+2 -1
mm/slab.c
··· 2907 2907 * functions. 2908 2908 */ 2909 2909 cachep = __find_general_cachep(size, flags); 2910 - BUG_ON(!cachep); /* Allocation size too large for kmalloc */ 2910 + if (unlikely(cachep == NULL)) 2911 + return NULL; 2911 2912 return __cache_alloc(cachep, flags); 2912 2913 } 2913 2914 EXPORT_SYMBOL(__kmalloc);