[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1289294671-6865-6-git-send-email-gthelen@google.com>
Date: Tue, 9 Nov 2010 01:24:30 -0800
From: Greg Thelen <gthelen@...gle.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Balbir Singh <balbir@...ux.vnet.ibm.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
Daisuke Nishimura <nishimura@....nes.nec.co.jp>,
Johannes Weiner <hannes@...xchg.org>,
Wu Fengguang <fengguang.wu@...el.com>,
Minchan Kim <minchan.kim@...il.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, Greg Thelen <gthelen@...gle.com>
Subject: [PATCH 5/6] memcg: simplify mem_cgroup_dirty_info()
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@...gle.com>
---
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists