memcg: fix wrong check of noswap with softlimit
Changes
1 files changed · +1 −1
| File | Status | Add | Del | Content |
|---|---|---|---|---|
| mm/memcontrol.c | modified | +1 | −1 | View file |
mm/memcontrol.c
View filediff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 02a7947..0b1a32c 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -1663,7 +1663,7 @@ static int mem_cgroup_hierarchical_reclaim(struct mem_cgroup *root_mem,
excess = res_counter_soft_limit_excess(&root_mem->res) >> PAGE_SHIFT;
/* If memsw_is_minimum==1, swap-out is of-no-use. */
- if (root_mem->memsw_is_minimum)
+ if (!check_soft && root_mem->memsw_is_minimum)
noswap = true;
while (1) {