| Submitter | Pekka Enberg |
|---|---|
| Date | Oct. 29, 2008, 10:16 a.m. |
| Message ID | <Pine.LNX.4.64.0810291215220.32108@melkki.cs.Helsinki.FI> |
| Download | mbox | patch |
| Permalink | /patch/6236/ |
| State | Not Applicable |
| Headers | show |
Comments
Patch
diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h index dc28432..4d3de0c 100644 --- a/include/linux/slub_def.h +++ b/include/linux/slub_def.h @@ -228,14 +228,13 @@ static __always_inline void *kmalloc_large(size_t size, gfp_t flags) static __always_inline void *kmalloc(size_t size, gfp_t flags) { - void *ret; - if (__builtin_constant_p(size)) { if (size > PAGE_SIZE) return kmalloc_large(size, flags); if (!(flags & SLUB_DMA)) { struct kmem_cache *s = kmalloc_slab(size); + void *ret; if (!s) return ZERO_SIZE_PTR;