Revert "USB: Correct Makefile to make isp1760 buildable"
[linux-2.6.git] / mm / slab.c
index aeeb4ec..9a90b00 100644 (file)
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -1169,7 +1169,7 @@ static void __cpuinit cpuup_canceled(long cpu)
        struct kmem_cache *cachep;
        struct kmem_list3 *l3 = NULL;
        int node = cpu_to_node(cpu);
-       node_to_cpumask_ptr(mask, node);
+       const struct cpumask *mask = cpumask_of_node(node);
 
        list_for_each_entry(cachep, &cache_chain, next) {
                struct array_cache *nc;
@@ -3327,6 +3327,8 @@ __cache_alloc_node(struct kmem_cache *cachep, gfp_t flags, int nodeid,
        unsigned long save_flags;
        void *ptr;
 
+       lockdep_trace_alloc(flags);
+
        if (slab_should_failslab(cachep, flags))
                return NULL;
 
@@ -3403,6 +3405,8 @@ __cache_alloc(struct kmem_cache *cachep, gfp_t flags, void *caller)
        unsigned long save_flags;
        void *objp;
 
+       lockdep_trace_alloc(flags);
+
        if (slab_should_failslab(cachep, flags))
                return NULL;
 
@@ -3561,8 +3565,8 @@ void *kmem_cache_alloc(struct kmem_cache *cachep, gfp_t flags)
 {
        void *ret = __cache_alloc(cachep, flags, __builtin_return_address(0));
 
-       kmemtrace_mark_alloc(KMEMTRACE_TYPE_CACHE, _RET_IP_, ret,
-                            obj_size(cachep), cachep->buffer_size, flags);
+       trace_kmem_cache_alloc(_RET_IP_, ret,
+                              obj_size(cachep), cachep->buffer_size, flags);
 
        return ret;
 }
@@ -3623,9 +3627,9 @@ void *kmem_cache_alloc_node(struct kmem_cache *cachep, gfp_t flags, int nodeid)
        void *ret = __cache_alloc_node(cachep, flags, nodeid,
                                       __builtin_return_address(0));
 
-       kmemtrace_mark_alloc_node(KMEMTRACE_TYPE_CACHE, _RET_IP_, ret,
-                                 obj_size(cachep), cachep->buffer_size,
-                                 flags, nodeid);
+       trace_kmem_cache_alloc_node(_RET_IP_, ret,
+                                   obj_size(cachep), cachep->buffer_size,
+                                   flags, nodeid);
 
        return ret;
 }
@@ -3653,9 +3657,8 @@ __do_kmalloc_node(size_t size, gfp_t flags, int node, void *caller)
                return cachep;
        ret = kmem_cache_alloc_node_notrace(cachep, flags, node);
 
-       kmemtrace_mark_alloc_node(KMEMTRACE_TYPE_KMALLOC,
-                                 (unsigned long) caller, ret,
-                                 size, cachep->buffer_size, flags, node);
+       trace_kmalloc_node((unsigned long) caller, ret,
+                          size, cachep->buffer_size, flags, node);
 
        return ret;
 }
@@ -3705,9 +3708,8 @@ static __always_inline void *__do_kmalloc(size_t size, gfp_t flags,
                return cachep;
        ret = __cache_alloc(cachep, flags, caller);
 
-       kmemtrace_mark_alloc(KMEMTRACE_TYPE_KMALLOC,
-                            (unsigned long) caller, ret,
-                            size, cachep->buffer_size, flags);
+       trace_kmalloc((unsigned long) caller, ret,
+                     size, cachep->buffer_size, flags);
 
        return ret;
 }
@@ -3753,7 +3755,7 @@ void kmem_cache_free(struct kmem_cache *cachep, void *objp)
        __cache_free(cachep, objp);
        local_irq_restore(flags);
 
-       kmemtrace_mark_free(KMEMTRACE_TYPE_CACHE, _RET_IP_, objp);
+       trace_kmem_cache_free(_RET_IP_, objp);
 }
 EXPORT_SYMBOL(kmem_cache_free);
 
@@ -3771,6 +3773,8 @@ void kfree(const void *objp)
        struct kmem_cache *c;
        unsigned long flags;
 
+       trace_kfree(_RET_IP_, objp);
+
        if (unlikely(ZERO_OR_NULL_PTR(objp)))
                return;
        local_irq_save(flags);
@@ -3780,8 +3784,6 @@ void kfree(const void *objp)
        debug_check_no_obj_freed(objp, obj_size(c));
        __cache_free(c, (void *)objp);
        local_irq_restore(flags);
-
-       kmemtrace_mark_free(KMEMTRACE_TYPE_KMALLOC, _RET_IP_, objp);
 }
 EXPORT_SYMBOL(kfree);
 
@@ -4045,8 +4047,7 @@ static void cache_reap(struct work_struct *w)
        struct kmem_cache *searchp;
        struct kmem_list3 *l3;
        int node = numa_node_id();
-       struct delayed_work *work =
-               container_of(w, struct delayed_work, work);
+       struct delayed_work *work = to_delayed_work(w);
 
        if (!mutex_trylock(&cache_chain_mutex))
                /* Give up. Setup the next iteration. */