diff options
Diffstat (limited to 'mm/memcontrol.c')
-rw-r--r-- | mm/memcontrol.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 010d6c14129a..194721839cf5 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c | |||
@@ -1199,7 +1199,6 @@ struct mem_cgroup *mem_cgroup_iter(struct mem_cgroup *root, | |||
1199 | 1199 | ||
1200 | mz = mem_cgroup_zoneinfo(root, nid, zid); | 1200 | mz = mem_cgroup_zoneinfo(root, nid, zid); |
1201 | iter = &mz->reclaim_iter[reclaim->priority]; | 1201 | iter = &mz->reclaim_iter[reclaim->priority]; |
1202 | last_visited = iter->last_visited; | ||
1203 | if (prev && reclaim->generation != iter->generation) { | 1202 | if (prev && reclaim->generation != iter->generation) { |
1204 | iter->last_visited = NULL; | 1203 | iter->last_visited = NULL; |
1205 | goto out_unlock; | 1204 | goto out_unlock; |
@@ -1218,13 +1217,12 @@ struct mem_cgroup *mem_cgroup_iter(struct mem_cgroup *root, | |||
1218 | * is alive. | 1217 | * is alive. |
1219 | */ | 1218 | */ |
1220 | dead_count = atomic_read(&root->dead_count); | 1219 | dead_count = atomic_read(&root->dead_count); |
1221 | smp_rmb(); | 1220 | if (dead_count == iter->last_dead_count) { |
1222 | last_visited = iter->last_visited; | 1221 | smp_rmb(); |
1223 | if (last_visited) { | 1222 | last_visited = iter->last_visited; |
1224 | if ((dead_count != iter->last_dead_count) || | 1223 | if (last_visited && |
1225 | !css_tryget(&last_visited->css)) { | 1224 | !css_tryget(&last_visited->css)) |
1226 | last_visited = NULL; | 1225 | last_visited = NULL; |
1227 | } | ||
1228 | } | 1226 | } |
1229 | } | 1227 | } |
1230 | 1228 | ||
@@ -3141,8 +3139,6 @@ int memcg_update_cache_size(struct kmem_cache *s, int num_groups) | |||
3141 | return -ENOMEM; | 3139 | return -ENOMEM; |
3142 | } | 3140 | } |
3143 | 3141 | ||
3144 | INIT_WORK(&s->memcg_params->destroy, | ||
3145 | kmem_cache_destroy_work_func); | ||
3146 | s->memcg_params->is_root_cache = true; | 3142 | s->memcg_params->is_root_cache = true; |
3147 | 3143 | ||
3148 | /* | 3144 | /* |