diff options
author | Shaohua Li <shli@fb.com> | 2015-10-16 00:28:29 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-10-16 20:42:28 +0200 |
commit | 424cdc14138088ada1b0e407a2195b2783c6e5ef (patch) | |
tree | 346cb6c621d85e998868d6f1d50be2b2bcd0982a /mm/memcontrol.c | |
parent | builddeb: remove debian/files before build (diff) | |
download | linux-424cdc14138088ada1b0e407a2195b2783c6e5ef.tar.xz linux-424cdc14138088ada1b0e407a2195b2783c6e5ef.zip |
memcg: convert threshold to bytes
page_counter_memparse() returns pages for the threshold, while
mem_cgroup_usage() returns bytes for memory usage. Convert the
threshold to bytes.
Fixes: 3e32cb2e0a12b6915 ("memcg: rename cgroup_event to mem_cgroup_event").
Signed-off-by: Shaohua Li <shli@fb.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/memcontrol.c')
-rw-r--r-- | mm/memcontrol.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 1fedbde68f59..d9b5c817dce8 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -3387,6 +3387,7 @@ static int __mem_cgroup_usage_register_event(struct mem_cgroup *memcg, ret = page_counter_memparse(args, "-1", &threshold); if (ret) return ret; + threshold <<= PAGE_SHIFT; mutex_lock(&memcg->thresholds_lock); |