Merge tag 'net-next-6.0' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev...
[linux-2.6-microblaze.git] / mm / slab_common.c
index 77c3adf..1799664 100644 (file)
 #include <linux/memcontrol.h>
 #include <linux/stackdepot.h>
 
-#define CREATE_TRACE_POINTS
-#include <trace/events/kmem.h>
-
 #include "internal.h"
-
 #include "slab.h"
 
+#define CREATE_TRACE_POINTS
+#include <trace/events/kmem.h>
+
 enum slab_state slab_state;
 LIST_HEAD(slab_caches);
 DEFINE_MUTEX(slab_mutex);
@@ -105,33 +104,6 @@ static inline int kmem_cache_sanity_check(const char *name, unsigned int size)
 }
 #endif
 
-void __kmem_cache_free_bulk(struct kmem_cache *s, size_t nr, void **p)
-{
-       size_t i;
-
-       for (i = 0; i < nr; i++) {
-               if (s)
-                       kmem_cache_free(s, p[i]);
-               else
-                       kfree(p[i]);
-       }
-}
-
-int __kmem_cache_alloc_bulk(struct kmem_cache *s, gfp_t flags, size_t nr,
-                                                               void **p)
-{
-       size_t i;
-
-       for (i = 0; i < nr; i++) {
-               void *x = p[i] = kmem_cache_alloc(s, flags);
-               if (!x) {
-                       __kmem_cache_free_bulk(s, i, p);
-                       return 0;
-               }
-       }
-       return i;
-}
-
 /*
  * Figure out what the alignment of the objects will be given a set of
  * flags, a user specified alignment and the size of the objects.
@@ -959,7 +931,7 @@ EXPORT_SYMBOL(kmalloc_order);
 void *kmalloc_order_trace(size_t size, gfp_t flags, unsigned int order)
 {
        void *ret = kmalloc_order(size, flags, order);
-       trace_kmalloc(_RET_IP_, ret, size, PAGE_SIZE << order, flags);
+       trace_kmalloc(_RET_IP_, ret, NULL, size, PAGE_SIZE << order, flags);
        return ret;
 }
 EXPORT_SYMBOL(kmalloc_order_trace);