aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/memcontrol.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/memcontrol.h')
-rw-r--r--include/linux/memcontrol.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index 72dff5fb0d0c..6c8918114804 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -463,6 +463,8 @@ memcg_kmem_newpage_charge(gfp_t gfp, struct mem_cgroup **memcg, int order)
463 if (!memcg_kmem_enabled()) 463 if (!memcg_kmem_enabled())
464 return true; 464 return true;
465 465
466 if (gfp & __GFP_NOACCOUNT)
467 return true;
466 /* 468 /*
467 * __GFP_NOFAIL allocations will move on even if charging is not 469 * __GFP_NOFAIL allocations will move on even if charging is not
468 * possible. Therefore we don't even try, and have this allocation 470 * possible. Therefore we don't even try, and have this allocation
@@ -522,6 +524,8 @@ memcg_kmem_get_cache(struct kmem_cache *cachep, gfp_t gfp)
522{ 524{
523 if (!memcg_kmem_enabled()) 525 if (!memcg_kmem_enabled())
524 return cachep; 526 return cachep;
527 if (gfp & __GFP_NOACCOUNT)
528 return cachep;
525 if (gfp & __GFP_NOFAIL) 529 if (gfp & __GFP_NOFAIL)
526 return cachep; 530 return cachep;
527 if (in_interrupt() || (!current->mm) || (current->flags & PF_KTHREAD)) 531 if (in_interrupt() || (!current->mm) || (current->flags & PF_KTHREAD))