2010-11-09 01:17:59

by Greg Thelen

[permalink] [raw]
Subject: [PATCH] memcg: correct memcg_hierarchical_free_pages() return type

memcg_hierarchical_free_pages() returns a page count and thus
should return unsigned long to be consistent with the rest of
mm code.

Signed-off-by: Greg Thelen <[email protected]>
---
mm/memcontrol.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index b287afd..35870f9 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -1340,7 +1340,7 @@ static long mem_cgroup_local_page_stat(struct mem_cgroup *mem,
* use_hierarchy is set, then this involves parent mem cgroups to find the
* cgroup with the smallest free space.
*/
-static unsigned long long
+static unsigned long
memcg_hierarchical_free_pages(struct mem_cgroup *mem)
{
unsigned long free, min_free;
--
1.7.3.1


2010-11-09 01:49:53

by Johannes Weiner

[permalink] [raw]
Subject: Re: [PATCH] memcg: correct memcg_hierarchical_free_pages() return type

On Mon, Nov 08, 2010 at 05:17:10PM -0800, Greg Thelen wrote:
> memcg_hierarchical_free_pages() returns a page count and thus
> should return unsigned long to be consistent with the rest of
> mm code.
>
> Signed-off-by: Greg Thelen <[email protected]>

Reviewed-by: Johannes Weiner <[email protected]>