lkml.org 
[lkml]   [2010]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 5/6] memcg: simplify mem_cgroup_dirty_info()
Date
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@google.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


\
 
 \ /
  Last update: 2010-11-09 10:29    [W:0.113 / U:1.448 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site