Merge tag 'omapdrm-4.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba...
[linux-2.6-block.git] / mm / slab.c
index 4f2ec6bb46ebe949d2e19ff154faddc7e2526f02..807d86c769088681b47f41c0cc0a721307bd16c1 100644 (file)
--- a/mm/slab.c
+++ b/mm/slab.c
 #include       <linux/kmemcheck.h>
 #include       <linux/memory.h>
 #include       <linux/prefetch.h>
+#include       <linux/sched/task_stack.h>
 
 #include       <net/sock.h>
 
@@ -1288,7 +1289,8 @@ void __init kmem_cache_init(void)
         * Initialize the caches that provide memory for the  kmem_cache_node
         * structures first.  Without this, further allocations will bug.
         */
-       kmalloc_caches[INDEX_NODE] = create_kmalloc_cache("kmalloc-node",
+       kmalloc_caches[INDEX_NODE] = create_kmalloc_cache(
+                               kmalloc_info[INDEX_NODE].name,
                                kmalloc_size(INDEX_NODE), ARCH_KMALLOC_FLAGS);
        slab_state = PARTIAL_NODE;
        setup_kmalloc_cache_index_table();
@@ -2332,6 +2334,13 @@ int __kmem_cache_shrink(struct kmem_cache *cachep)
        return (ret ? 1 : 0);
 }
 
+#ifdef CONFIG_MEMCG
+void __kmemcg_cache_deactivate(struct kmem_cache *cachep)
+{
+       __kmem_cache_shrink(cachep);
+}
+#endif
+
 int __kmem_cache_shutdown(struct kmem_cache *cachep)
 {
        return __kmem_cache_shrink(cachep);