From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Shaohua Li , Johannes Weiner , Michal Hocko , Andrew Morton , Linus Torvalds Subject: [PATCH 4.2 25/54] memcg: convert threshold to bytes Date: Fri, 23 Oct 2015 10:45:01 -0700 Message-Id: <20151023174519.845601158@linuxfoundation.org> In-Reply-To: <20151023174519.086915553@linuxfoundation.org> References: <20151023174519.086915553@linuxfoundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: 4.2-stable review patch. If anyone has any objections, please let me know. ------------------ From: Shaohua Li commit 424cdc14138088ada1b0e407a2195b2783c6e5ef upstream. 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 Cc: Johannes Weiner Acked-by: Michal Hocko Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- mm/memcontrol.c | 1 + 1 file changed, 1 insertion(+) --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -3687,6 +3687,7 @@ static int __mem_cgroup_usage_register_e ret = page_counter_memparse(args, "-1", &threshold); if (ret) return ret; + threshold <<= PAGE_SHIFT; mutex_lock(&memcg->thresholds_lock);