]> rtime.felk.cvut.cz Git - zynq/linux.git/blobdiff - include/linux/memcontrol.h
Merge tag 'v4.0.8' into xlnx_4.0.8-rt6
[zynq/linux.git] / include / linux / memcontrol.h
index 72dff5fb0d0ceaf0386d80f1cba83c7bb2c7632f..6c8918114804fda89d00ed3e6b1482539f2dd4ee 100644 (file)
@@ -463,6 +463,8 @@ memcg_kmem_newpage_charge(gfp_t gfp, struct mem_cgroup **memcg, int order)
        if (!memcg_kmem_enabled())
                return true;
 
+       if (gfp & __GFP_NOACCOUNT)
+               return true;
        /*
         * __GFP_NOFAIL allocations will move on even if charging is not
         * 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)
 {
        if (!memcg_kmem_enabled())
                return cachep;
+       if (gfp & __GFP_NOACCOUNT)
+               return cachep;
        if (gfp & __GFP_NOFAIL)
                return cachep;
        if (in_interrupt() || (!current->mm) || (current->flags & PF_KTHREAD))