diff options
Diffstat (limited to 'mm/memcontrol.c')
-rw-r--r-- | mm/memcontrol.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 5a1d584ffed3..37c356646544 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c | |||
@@ -2343,7 +2343,6 @@ static int __mem_cgroup_try_charge(struct mm_struct *mm, | |||
2343 | again: | 2343 | again: |
2344 | if (*ptr) { /* css should be a valid one */ | 2344 | if (*ptr) { /* css should be a valid one */ |
2345 | memcg = *ptr; | 2345 | memcg = *ptr; |
2346 | VM_BUG_ON(css_is_removed(&memcg->css)); | ||
2347 | if (mem_cgroup_is_root(memcg)) | 2346 | if (mem_cgroup_is_root(memcg)) |
2348 | goto done; | 2347 | goto done; |
2349 | if (nr_pages == 1 && consume_stock(memcg)) | 2348 | if (nr_pages == 1 && consume_stock(memcg)) |
@@ -2483,9 +2482,9 @@ static void __mem_cgroup_cancel_local_charge(struct mem_cgroup *memcg, | |||
2483 | 2482 | ||
2484 | /* | 2483 | /* |
2485 | * A helper function to get mem_cgroup from ID. must be called under | 2484 | * A helper function to get mem_cgroup from ID. must be called under |
2486 | * rcu_read_lock(). The caller must check css_is_removed() or some if | 2485 | * rcu_read_lock(). The caller is responsible for calling css_tryget if |
2487 | * it's concern. (dropping refcnt from swap can be called against removed | 2486 | * the mem_cgroup is used for charging. (dropping refcnt from swap can be |
2488 | * memcg.) | 2487 | * called against removed memcg.) |
2489 | */ | 2488 | */ |
2490 | static struct mem_cgroup *mem_cgroup_lookup(unsigned short id) | 2489 | static struct mem_cgroup *mem_cgroup_lookup(unsigned short id) |
2491 | { | 2490 | { |