mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
mm: memcontrol: consolidate cgroup socket tracking
The cgroup core and the memory controller need to track socket ownership for different purposes, but the tracking sites being entirely different is kind of ugly. Be a better citizen and rename the memory controller callbacks to match the cgroup core callbacks, then move them to the same place. [[email protected]: coding-style fixes] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Johannes Weiner <[email protected]> Acked-by: Tejun Heo <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Vladimir Davydov <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
08ea8c07fb
commit
2d75807383
5 changed files with 20 additions and 20 deletions
|
|
@ -424,8 +424,6 @@ void tcp_init_sock(struct sock *sk)
|
|||
sk->sk_rcvbuf = sysctl_tcp_rmem[1];
|
||||
|
||||
local_bh_disable();
|
||||
if (mem_cgroup_sockets_enabled)
|
||||
sock_update_memcg(sk);
|
||||
sk_sockets_allocated_inc(sk);
|
||||
local_bh_enable();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1871,9 +1871,6 @@ void tcp_v4_destroy_sock(struct sock *sk)
|
|||
local_bh_disable();
|
||||
sk_sockets_allocated_dec(sk);
|
||||
local_bh_enable();
|
||||
|
||||
if (mem_cgroup_sockets_enabled && sk->sk_memcg)
|
||||
sock_release_memcg(sk);
|
||||
}
|
||||
EXPORT_SYMBOL(tcp_v4_destroy_sock);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue