Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-block.git] / mm / memcontrol.c
index 54920cbc46bfdcb87b0a4ae3e6b4538596b6bd58..6e1469b80cb7d57d3cdf01ef9c917a21ece0b7fa 100644 (file)
@@ -2593,7 +2593,7 @@ int memcg_kmem_charge(struct page *page, gfp_t gfp, int order)
        struct mem_cgroup *memcg;
        int ret = 0;
 
-       if (memcg_kmem_bypass())
+       if (mem_cgroup_disabled() || memcg_kmem_bypass())
                return 0;
 
        memcg = get_mem_cgroup_from_current();