]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - mm/memcontrol.c
Merge tag 'linux-cpupower-4.15-rc2' of git://git.kernel.org/pub/scm/linux/kernel...
[linux.git] / mm / memcontrol.c
index d5f3a62887cf958f6b657c0f542f0cf2c3e86e8d..50e6906314f8d9c987181744c9a45b54872edfb6 100644 (file)
@@ -4049,7 +4049,7 @@ static struct cftype mem_cgroup_legacy_files[] = {
                .write = mem_cgroup_reset,
                .read_u64 = mem_cgroup_read_u64,
        },
-#ifdef CONFIG_SLABINFO
+#if defined(CONFIG_SLAB) || defined(CONFIG_SLUB_DEBUG)
        {
                .name = "kmem.slabinfo",
                .seq_start = memcg_slab_start,
@@ -5828,21 +5828,6 @@ void mem_cgroup_sk_alloc(struct sock *sk)
        if (!mem_cgroup_sockets_enabled)
                return;
 
-       /*
-        * Socket cloning can throw us here with sk_memcg already
-        * filled. It won't however, necessarily happen from
-        * process context. So the test for root memcg given
-        * the current task's memcg won't help us in this case.
-        *
-        * Respecting the original socket's memcg is a better
-        * decision in this case.
-        */
-       if (sk->sk_memcg) {
-               BUG_ON(mem_cgroup_is_root(sk->sk_memcg));
-               css_get(&sk->sk_memcg->css);
-               return;
-       }
-
        rcu_read_lock();
        memcg = mem_cgroup_from_task(current);
        if (memcg == root_mem_cgroup)