diff options
Diffstat (limited to 'mm/memcontrol.c')
-rw-r--r-- | mm/memcontrol.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 14c2f2017e37..a04225d372ba 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c | |||
@@ -2323,6 +2323,8 @@ done_restock: | |||
2323 | css_get_many(&memcg->css, batch); | 2323 | css_get_many(&memcg->css, batch); |
2324 | if (batch > nr_pages) | 2324 | if (batch > nr_pages) |
2325 | refill_stock(memcg, batch - nr_pages); | 2325 | refill_stock(memcg, batch - nr_pages); |
2326 | if (!(gfp_mask & __GFP_WAIT)) | ||
2327 | goto done; | ||
2326 | /* | 2328 | /* |
2327 | * If the hierarchy is above the normal consumption range, | 2329 | * If the hierarchy is above the normal consumption range, |
2328 | * make the charging task trim their excess contribution. | 2330 | * make the charging task trim their excess contribution. |
@@ -5833,9 +5835,7 @@ void mem_cgroup_swapout(struct page *page, swp_entry_t entry) | |||
5833 | if (!mem_cgroup_is_root(memcg)) | 5835 | if (!mem_cgroup_is_root(memcg)) |
5834 | page_counter_uncharge(&memcg->memory, 1); | 5836 | page_counter_uncharge(&memcg->memory, 1); |
5835 | 5837 | ||
5836 | /* XXX: caller holds IRQ-safe mapping->tree_lock */ | 5838 | /* Caller disabled preemption with mapping->tree_lock */ |
5837 | VM_BUG_ON(!irqs_disabled()); | ||
5838 | |||
5839 | mem_cgroup_charge_statistics(memcg, page, -1); | 5839 | mem_cgroup_charge_statistics(memcg, page, -1); |
5840 | memcg_check_events(memcg, page); | 5840 | memcg_check_events(memcg, page); |
5841 | } | 5841 | } |