Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 376981
b: refs/heads/master
c: 89dc991
h: refs/heads/master
i:
  376979: bc757e7
v: v3
  • Loading branch information
Johannes Weiner authored and Linus Torvalds committed Jun 12, 2013
1 parent cdb2d1f commit f17d804
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7b57976da48e60b66fdbb9e97f5711b5382a49d7
refs/heads/master: 89dc991f0f5272c307c746fdd57d0bff382b1ba2
12 changes: 5 additions & 7 deletions trunk/mm/memcontrol.c
Original file line number Diff line number Diff line change
Expand Up @@ -1199,7 +1199,6 @@ struct mem_cgroup *mem_cgroup_iter(struct mem_cgroup *root,

mz = mem_cgroup_zoneinfo(root, nid, zid);
iter = &mz->reclaim_iter[reclaim->priority];
last_visited = iter->last_visited;
if (prev && reclaim->generation != iter->generation) {
iter->last_visited = NULL;
goto out_unlock;
Expand All @@ -1218,13 +1217,12 @@ struct mem_cgroup *mem_cgroup_iter(struct mem_cgroup *root,
* is alive.
*/
dead_count = atomic_read(&root->dead_count);
smp_rmb();
last_visited = iter->last_visited;
if (last_visited) {
if ((dead_count != iter->last_dead_count) ||
!css_tryget(&last_visited->css)) {
if (dead_count == iter->last_dead_count) {
smp_rmb();
last_visited = iter->last_visited;
if (last_visited &&
!css_tryget(&last_visited->css))
last_visited = NULL;
}
}
}

Expand Down

0 comments on commit f17d804

Please sign in to comment.