diff --git a/mm/slab_common.c b/mm/slab_common.c index 538bade6df7dc2a3f27c9ad5ac5f0efc8a6d08bc..f0410eb617410015209d536104acd925f49096c4 100644 --- a/mm/slab_common.c +++ b/mm/slab_common.c @@ -373,7 +373,7 @@ struct kmem_cache *kmalloc_slab(size_t size, gfp_t flags) { int index; - if (size > KMALLOC_MAX_SIZE) { + if (unlikely(size > KMALLOC_MAX_SIZE)) { WARN_ON_ONCE(!(flags & __GFP_NOWARN)); return NULL; }