Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 179355
b: refs/heads/master
c: fce6647
h: refs/heads/master
i:
  179353: c18dea8
  179351: 31036dd
v: v3
  • Loading branch information
Daisuke Nishimura authored and Linus Torvalds committed Jan 16, 2010
1 parent 674f054 commit 813b16f
Show file tree
Hide file tree
Showing 2 changed files with 5 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: d817cd525589765aa5f6798734e422c867685a58
refs/heads/master: fce66477578d081f19aef5ea218664ff7758c33a
11 changes: 4 additions & 7 deletions trunk/mm/memcontrol.c
Original file line number Diff line number Diff line change
Expand Up @@ -2586,7 +2586,7 @@ static int mem_cgroup_force_empty(struct mem_cgroup *mem, bool free_all)
if (free_all)
goto try_to_free;
move_account:
while (mem->res.usage > 0) {
do {
ret = -EBUSY;
if (cgroup_task_count(cgrp) || !list_empty(&cgrp->children))
goto out;
Expand Down Expand Up @@ -2614,8 +2614,8 @@ static int mem_cgroup_force_empty(struct mem_cgroup *mem, bool free_all)
if (ret == -ENOMEM)
goto try_to_free;
cond_resched();
}
ret = 0;
/* "ret" should also be checked to ensure all lists are empty. */
} while (mem->res.usage > 0 || ret);
out:
css_put(&mem->css);
return ret;
Expand Down Expand Up @@ -2648,10 +2648,7 @@ static int mem_cgroup_force_empty(struct mem_cgroup *mem, bool free_all)
}
lru_add_drain();
/* try move_account...there may be some *locked* pages. */
if (mem->res.usage)
goto move_account;
ret = 0;
goto out;
goto move_account;
}

int mem_cgroup_force_empty_write(struct cgroup *cont, unsigned int event)
Expand Down

0 comments on commit 813b16f

Please sign in to comment.