aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memcontrol.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/memcontrol.c')
-rw-r--r--mm/memcontrol.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index d5f3a62887cf..661f046ad318 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -5828,21 +5828,6 @@ void mem_cgroup_sk_alloc(struct sock *sk)
5828 if (!mem_cgroup_sockets_enabled) 5828 if (!mem_cgroup_sockets_enabled)
5829 return; 5829 return;
5830 5830
5831 /*
5832 * Socket cloning can throw us here with sk_memcg already
5833 * filled. It won't however, necessarily happen from
5834 * process context. So the test for root memcg given
5835 * the current task's memcg won't help us in this case.
5836 *
5837 * Respecting the original socket's memcg is a better
5838 * decision in this case.
5839 */
5840 if (sk->sk_memcg) {
5841 BUG_ON(mem_cgroup_is_root(sk->sk_memcg));
5842 css_get(&sk->sk_memcg->css);
5843 return;
5844 }
5845
5846 rcu_read_lock(); 5831 rcu_read_lock();
5847 memcg = mem_cgroup_from_task(current); 5832 memcg = mem_cgroup_from_task(current);
5848 if (memcg == root_mem_cgroup) 5833 if (memcg == root_mem_cgroup)