diff options
author | David S. Miller <davem@davemloft.net> | 2015-06-13 23:56:52 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-06-13 23:56:52 -0700 |
commit | 25c43bf13b1657d9a2f6a2565e9159ce31517aa5 (patch) | |
tree | c1fef736d3227dbd3788206c746d00763247f232 /mm/memcontrol.c | |
parent | a2f0fad32b0d0022c7e5706d333d74a9579f3742 (diff) | |
parent | c8d17b451aa18b07b60e771addf17a5fdd4138c7 (diff) | |
download | linux-25c43bf13b1657d9a2f6a2565e9159ce31517aa5.tar.bz2 |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
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: css_get_many(&memcg->css, batch); if (batch > nr_pages) refill_stock(memcg, batch - nr_pages); + if (!(gfp_mask & __GFP_WAIT)) + goto done; /* * If the hierarchy is above the normal consumption range, * make the charging task trim their excess contribution. @@ -5833,9 +5835,7 @@ void mem_cgroup_swapout(struct page *page, swp_entry_t entry) if (!mem_cgroup_is_root(memcg)) page_counter_uncharge(&memcg->memory, 1); - /* XXX: caller holds IRQ-safe mapping->tree_lock */ - VM_BUG_ON(!irqs_disabled()); - + /* Caller disabled preemption with mapping->tree_lock */ mem_cgroup_charge_statistics(memcg, page, -1); memcg_check_events(memcg, page); } |