Commit 1abd727e authored by Christoph Lameter's avatar Christoph Lameter Committed by Linus Torvalds

SLUB: It is legit to allocate a slab of the maximum permitted size

Sorry I screwed up the comparison. It is only an error if we attempt
to allocate a slab larger than the maximum allowed size.
Signed-off-by: default avatarChristoph Lameter <clameter@sgi.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent faab83bb
...@@ -88,7 +88,7 @@ static inline int kmalloc_index(int size) ...@@ -88,7 +88,7 @@ static inline int kmalloc_index(int size)
*/ */
WARN_ON_ONCE(size == 0); WARN_ON_ONCE(size == 0);
if (size >= (1 << KMALLOC_SHIFT_HIGH)) if (size > (1 << KMALLOC_SHIFT_HIGH))
return -1; return -1;
if (size > 64 && size <= 96) if (size > 64 && size <= 96)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment