aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/res_counter.h4
-rw-r--r--mm/memcontrol.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/res_counter.h b/include/linux/res_counter.h
index a5930cb66145..bf1f01bc013f 100644
--- a/include/linux/res_counter.h
+++ b/include/linux/res_counter.h
@@ -139,7 +139,7 @@ static inline bool res_counter_limit_check_locked(struct res_counter *cnt)
139 139
140static inline bool res_counter_soft_limit_check_locked(struct res_counter *cnt) 140static inline bool res_counter_soft_limit_check_locked(struct res_counter *cnt)
141{ 141{
142 if (cnt->usage < cnt->soft_limit) 142 if (cnt->usage <= cnt->soft_limit)
143 return true; 143 return true;
144 144
145 return false; 145 return false;
@@ -202,7 +202,7 @@ static inline bool res_counter_check_margin(struct res_counter *cnt,
202 return ret; 202 return ret;
203} 203}
204 204
205static inline bool res_counter_check_under_soft_limit(struct res_counter *cnt) 205static inline bool res_counter_check_within_soft_limit(struct res_counter *cnt)
206{ 206{
207 bool ret; 207 bool ret;
208 unsigned long flags; 208 unsigned long flags;
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index b56bd74b486f..13de53fe0108 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -1477,7 +1477,7 @@ static int mem_cgroup_hierarchical_reclaim(struct mem_cgroup *root_mem,
1477 return ret; 1477 return ret;
1478 total += ret; 1478 total += ret;
1479 if (check_soft) { 1479 if (check_soft) {
1480 if (res_counter_check_under_soft_limit(&root_mem->res)) 1480 if (res_counter_check_within_soft_limit(&root_mem->res))
1481 return total; 1481 return total;
1482 } else if (mem_cgroup_check_under_limit(root_mem)) 1482 } else if (mem_cgroup_check_under_limit(root_mem))
1483 return 1 + total; 1483 return 1 + total;