]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - mm/slab_common.c
IB/ipoib: For sendonly join free the multicast group on leave
[karo-tx-linux.git] / mm / slab_common.c
index c26829fe4e37ea0b38ce6c26fef84a7dcb528eee..5ce4faeb16fbbdfa19b16c3d551aace8c3a495c0 100644 (file)
@@ -500,7 +500,7 @@ void memcg_create_kmem_cache(struct mem_cgroup *memcg,
                             struct kmem_cache *root_cache)
 {
        static char memcg_name_buf[NAME_MAX + 1]; /* protected by slab_mutex */
-       struct cgroup_subsys_state *css = mem_cgroup_css(memcg);
+       struct cgroup_subsys_state *css = &memcg->css;
        struct memcg_cache_array *arr;
        struct kmem_cache *s = NULL;
        char *cache_name;
@@ -640,6 +640,9 @@ void kmem_cache_destroy(struct kmem_cache *s)
        bool need_rcu_barrier = false;
        bool busy = false;
 
+       if (unlikely(!s))
+               return;
+
        BUG_ON(!is_root_cache(s));
 
        get_online_cpus();