mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
memcg: rename RESOURCE_MAX to RES_COUNTER_MAX
RESOURCE_MAX is far too general name, change it to RES_COUNTER_MAX. Signed-off-by: Sha Zhengju <[email protected]> Signed-off-by: Qiang Huang <[email protected]> Acked-by: Michal Hocko <[email protected]> Cc: Daisuke Nishimura <[email protected]> Cc: Jeff Liu <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
34ff8dc089
commit
6de5a8bfca
4 changed files with 12 additions and 12 deletions
|
|
@ -87,8 +87,8 @@ static int tcp_update_limit(struct mem_cgroup *memcg, u64 val)
|
|||
if (!cg_proto)
|
||||
return -EINVAL;
|
||||
|
||||
if (val > RESOURCE_MAX)
|
||||
val = RESOURCE_MAX;
|
||||
if (val > RES_COUNTER_MAX)
|
||||
val = RES_COUNTER_MAX;
|
||||
|
||||
tcp = tcp_from_cgproto(cg_proto);
|
||||
|
||||
|
|
@ -101,9 +101,9 @@ static int tcp_update_limit(struct mem_cgroup *memcg, u64 val)
|
|||
tcp->tcp_prot_mem[i] = min_t(long, val >> PAGE_SHIFT,
|
||||
net->ipv4.sysctl_tcp_mem[i]);
|
||||
|
||||
if (val == RESOURCE_MAX)
|
||||
if (val == RES_COUNTER_MAX)
|
||||
clear_bit(MEMCG_SOCK_ACTIVE, &cg_proto->flags);
|
||||
else if (val != RESOURCE_MAX) {
|
||||
else if (val != RES_COUNTER_MAX) {
|
||||
/*
|
||||
* The active bit needs to be written after the static_key
|
||||
* update. This is what guarantees that the socket activation
|
||||
|
|
@ -187,7 +187,7 @@ static u64 tcp_cgroup_read(struct cgroup_subsys_state *css, struct cftype *cft)
|
|||
|
||||
switch (cft->private) {
|
||||
case RES_LIMIT:
|
||||
val = tcp_read_stat(memcg, RES_LIMIT, RESOURCE_MAX);
|
||||
val = tcp_read_stat(memcg, RES_LIMIT, RES_COUNTER_MAX);
|
||||
break;
|
||||
case RES_USAGE:
|
||||
val = tcp_read_usage(memcg);
|
||||
|
|
|
|||
Loading…
Reference in a new issue