[PATCH 5/6] memcg: simplify mem_cgroup_dirty_info()
From: Greg Thelen
Date: Tue Nov 09 2010 - 04:25:58 EST
Because mem_cgroup_page_stat() no longer returns negative numbers
to indicate failure, mem_cgroup_dirty_info() does not need to check
for such failures.
Signed-off-by: Greg Thelen <gthelen@xxxxxxxxxx>
---
mm/memcontrol.c | 14 +++-----------
1 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index f8df350..ccdbb7e 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -1258,8 +1258,6 @@ bool mem_cgroup_dirty_info(unsigned long sys_available_mem,
__mem_cgroup_dirty_param(&dirty_param, memcg);
value = mem_cgroup_page_stat(memcg, MEMCG_NR_DIRTYABLE_PAGES);
- if (value < 0)
- goto done;
available_mem = min((unsigned long)value, sys_available_mem);
@@ -1279,15 +1277,9 @@ bool mem_cgroup_dirty_info(unsigned long sys_available_mem,
(dirty_param.dirty_background_ratio *
available_mem) / 100;
- value = mem_cgroup_page_stat(memcg, MEMCG_NR_RECLAIM_PAGES);
- if (value < 0)
- goto done;
- info->nr_reclaimable = value;
-
- value = mem_cgroup_page_stat(memcg, MEMCG_NR_WRITEBACK);
- if (value < 0)
- goto done;
- info->nr_writeback = value;
+ info->nr_reclaimable =
+ mem_cgroup_page_stat(memcg, MEMCG_NR_RECLAIM_PAGES);
+ info->nr_writeback = mem_cgroup_page_stat(memcg, MEMCG_NR_WRITEBACK);
valid = true;
--
1.7.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/