diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2010-02-22 13:48:51 +0100 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2010-02-22 13:48:51 +0100 |
commit | f11cbd74c5ff3614f6390b4de67a6ffdc614c378 (patch) | |
tree | 6a30920ade9eeaac5bf6d6263b5d09712e882eb0 /mm/memcontrol.c | |
parent | 429c42c9d246f5bda868495c09974312a0177328 (diff) | |
parent | aea187c46f7d03ce985e55eb1398d0776a15b928 (diff) | |
download | op-kernel-dev-f11cbd74c5ff3614f6390b4de67a6ffdc614c378.zip op-kernel-dev-f11cbd74c5ff3614f6390b4de67a6ffdc614c378.tar.gz |
Merge branch 'master' into for-2.6.34
Diffstat (limited to 'mm/memcontrol.c')
-rw-r--r-- | mm/memcontrol.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 488b644..954032b 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -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; @@ -2614,8 +2614,8 @@ move_account: 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; @@ -2648,10 +2648,7 @@ try_to_free: } 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) |