ide-cd: fix kernel crash on hppa regression
[safe/jmp/linux-2.6] / include / linux / slab_def.h
index 455f9af..5ac9b0b 100644 (file)
@@ -62,10 +62,7 @@ static __always_inline void *kmalloc(size_t size, gfp_t flags)
                        i++;
 #include <linux/kmalloc_sizes.h>
 #undef CACHE
-               {
-                       extern void __you_cannot_kmalloc_that_much(void);
-                       __you_cannot_kmalloc_that_much();
-               }
+               return NULL;
 found:
 #ifdef CONFIG_ZONE_DMA
                if (flags & GFP_DMA)
@@ -76,8 +73,8 @@ found:
 
                ret = kmem_cache_alloc_notrace(cachep, flags);
 
-               kmemtrace_mark_alloc(KMEMTRACE_TYPE_KMALLOC, _THIS_IP_, ret,
-                                    size, slab_buffer_size(cachep), flags);
+               trace_kmalloc(_THIS_IP_, ret,
+                             size, slab_buffer_size(cachep), flags);
 
                return ret;
        }
@@ -120,10 +117,7 @@ static __always_inline void *kmalloc_node(size_t size, gfp_t flags, int node)
                        i++;
 #include <linux/kmalloc_sizes.h>
 #undef CACHE
-               {
-                       extern void __you_cannot_kmalloc_that_much(void);
-                       __you_cannot_kmalloc_that_much();
-               }
+               return NULL;
 found:
 #ifdef CONFIG_ZONE_DMA
                if (flags & GFP_DMA)
@@ -134,9 +128,9 @@ found:
 
                ret = kmem_cache_alloc_node_notrace(cachep, flags, node);
 
-               kmemtrace_mark_alloc_node(KMEMTRACE_TYPE_KMALLOC, _THIS_IP_,
-                                         ret, size, slab_buffer_size(cachep),
-                                         flags, node);
+               trace_kmalloc_node(_THIS_IP_, ret,
+                                  size, slab_buffer_size(cachep),
+                                  flags, node);
 
                return ret;
        }