提交 1abd727e 编写于 作者: C Christoph Lameter 提交者: 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: NChristoph Lameter <clameter@sgi.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册