diff options
author | Sha Zhengju <handai.szj@taobao.com> | 2013-09-12 18:13:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-12 18:38:02 -0400 |
commit | 6de5a8bfcae6e3b427d642eff078d8305b324b52 (patch) | |
tree | 333d73c79bdec97184c4a60e45453a167730fd7b /net | |
parent | 34ff8dc08956098563989d8599840b130be81252 (diff) |
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 <handai.szj@taobao.com>
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Acked-by: Michal Hocko <mhocko@suse.cz>
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: Jeff Liu <jeff.liu@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/tcp_memcontrol.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/ipv4/tcp_memcontrol.c b/net/ipv4/tcp_memcontrol.c index 8a57d79b0b16..559d4ae6ebf4 100644 --- a/net/ipv4/tcp_memcontrol.c +++ b/net/ipv4/tcp_memcontrol.c | |||
@@ -87,8 +87,8 @@ static int tcp_update_limit(struct mem_cgroup *memcg, u64 val) | |||
87 | if (!cg_proto) | 87 | if (!cg_proto) |
88 | return -EINVAL; | 88 | return -EINVAL; |
89 | 89 | ||
90 | if (val > RESOURCE_MAX) | 90 | if (val > RES_COUNTER_MAX) |
91 | val = RESOURCE_MAX; | 91 | val = RES_COUNTER_MAX; |
92 | 92 | ||
93 | tcp = tcp_from_cgproto(cg_proto); | 93 | tcp = tcp_from_cgproto(cg_proto); |
94 | 94 | ||
@@ -101,9 +101,9 @@ static int tcp_update_limit(struct mem_cgroup *memcg, u64 val) | |||
101 | tcp->tcp_prot_mem[i] = min_t(long, val >> PAGE_SHIFT, | 101 | tcp->tcp_prot_mem[i] = min_t(long, val >> PAGE_SHIFT, |
102 | net->ipv4.sysctl_tcp_mem[i]); | 102 | net->ipv4.sysctl_tcp_mem[i]); |
103 | 103 | ||
104 | if (val == RESOURCE_MAX) | 104 | if (val == RES_COUNTER_MAX) |
105 | clear_bit(MEMCG_SOCK_ACTIVE, &cg_proto->flags); | 105 | clear_bit(MEMCG_SOCK_ACTIVE, &cg_proto->flags); |
106 | else if (val != RESOURCE_MAX) { | 106 | else if (val != RES_COUNTER_MAX) { |
107 | /* | 107 | /* |
108 | * The active bit needs to be written after the static_key | 108 | * The active bit needs to be written after the static_key |
109 | * update. This is what guarantees that the socket activation | 109 | * 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) | |||
187 | 187 | ||
188 | switch (cft->private) { | 188 | switch (cft->private) { |
189 | case RES_LIMIT: | 189 | case RES_LIMIT: |
190 | val = tcp_read_stat(memcg, RES_LIMIT, RESOURCE_MAX); | 190 | val = tcp_read_stat(memcg, RES_LIMIT, RES_COUNTER_MAX); |
191 | break; | 191 | break; |
192 | case RES_USAGE: | 192 | case RES_USAGE: |
193 | val = tcp_read_usage(memcg); | 193 | val = tcp_read_usage(memcg); |