]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - mm/memcontrol.c
UBUNTU: Ubuntu-4.15.0-96.97
[mirror_ubuntu-bionic-kernel.git] / mm / memcontrol.c
index 31e729d7ffe4dd21a4e5ab8eefbb4c09466303f2..1a34cd1d17a3c65edd42f35b3f9de0b240f64873 100644 (file)
@@ -731,7 +731,7 @@ static struct mem_cgroup *get_mem_cgroup_from_mm(struct mm_struct *mm)
                        if (unlikely(!memcg))
                                memcg = root_mem_cgroup;
                }
-       } while (!css_tryget_online(&memcg->css));
+       } while (!css_tryget(&memcg->css));
        rcu_read_unlock();
        return memcg;
 }
@@ -2402,7 +2402,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_mm(current->mm);