diff options
| -rw-r--r-- | mm/memcontrol.c | 6 | ||||
| -rw-r--r-- | mm/vmscan.c | 4 |
2 files changed, 2 insertions, 8 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 5ee0af463f2e..5cf7726764cc 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c | |||
| @@ -1872,11 +1872,7 @@ enum mem_cgroup_filter_t | |||
| 1872 | mem_cgroup_soft_reclaim_eligible(struct mem_cgroup *memcg, | 1872 | mem_cgroup_soft_reclaim_eligible(struct mem_cgroup *memcg, |
| 1873 | struct mem_cgroup *root) | 1873 | struct mem_cgroup *root) |
| 1874 | { | 1874 | { |
| 1875 | struct mem_cgroup *parent; | 1875 | struct mem_cgroup *parent = memcg; |
| 1876 | |||
| 1877 | if (!memcg) | ||
| 1878 | memcg = root_mem_cgroup; | ||
| 1879 | parent = memcg; | ||
| 1880 | 1876 | ||
| 1881 | if (res_counter_soft_limit_excess(&memcg->res)) | 1877 | if (res_counter_soft_limit_excess(&memcg->res)) |
| 1882 | return VISIT; | 1878 | return VISIT; |
diff --git a/mm/vmscan.c b/mm/vmscan.c index 97b0ed16749f..cdd300b81485 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
| @@ -142,9 +142,7 @@ static bool global_reclaim(struct scan_control *sc) | |||
| 142 | 142 | ||
| 143 | static bool mem_cgroup_should_soft_reclaim(struct scan_control *sc) | 143 | static bool mem_cgroup_should_soft_reclaim(struct scan_control *sc) |
| 144 | { | 144 | { |
| 145 | struct mem_cgroup *root = sc->target_mem_cgroup; | 145 | return !mem_cgroup_disabled(); |
| 146 | return !mem_cgroup_disabled() && | ||
| 147 | mem_cgroup_soft_reclaim_eligible(root, root) != SKIP_TREE; | ||
| 148 | } | 146 | } |
| 149 | #else | 147 | #else |
| 150 | static bool global_reclaim(struct scan_control *sc) | 148 | static bool global_reclaim(struct scan_control *sc) |
