diff --git a/[refs] b/[refs] index 3cb41af20105..b10e59cb5823 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0b44f7a5b5078d737b3f5914978aabb761254840 +refs/heads/master: ade3aff25fb2dce76e2a9b53e1334bd0a174f739 diff --git a/trunk/include/linux/slub_def.h b/trunk/include/linux/slub_def.h index 5e2e7297dfaa..a9fb92862aaa 100644 --- a/trunk/include/linux/slub_def.h +++ b/trunk/include/linux/slub_def.h @@ -145,7 +145,12 @@ static inline struct kmem_cache *kmalloc_slab(size_t size) if (index == 0) return NULL; - if (index < 0) { + /* + * This function only gets expanded if __builtin_constant_p(size), so + * testing it here shouldn't be needed. But some versions of gcc need + * help. + */ + if (__builtin_constant_p(size) && index < 0) { /* * Generate a link failure. Would be great if we could * do something to stop the compile here.