clk: rockchip: rk3399: Don't allow VPLL as aclk_cci clock source
[firefly-linux-kernel-4.4.55.git] / mm / hugetlb_cgroup.c
index 6e0057439a469b2cf38e9e9aee1f40a17dd08d59..d8fb10de0f1449f0cd912aaa65d6887c338b20aa 100644 (file)
@@ -186,7 +186,8 @@ again:
        }
        rcu_read_unlock();
 
-       ret = page_counter_try_charge(&h_cg->hugepage[idx], nr_pages, &counter);
+       if (!page_counter_try_charge(&h_cg->hugepage[idx], nr_pages, &counter))
+               ret = -ENOMEM;
        css_put(&h_cg->css);
 done:
        *ptr = h_cg;
@@ -384,7 +385,7 @@ void __init hugetlb_cgroup_file_init(void)
                /*
                 * Add cgroup control files only if the huge page consists
                 * of more than two normal pages. This is because we use
-                * page[2].lru.next for storing cgroup details.
+                * page[2].private for storing cgroup details.
                 */
                if (huge_page_order(h) >= HUGETLB_CGROUP_MIN_ORDER)
                        __hugetlb_cgroup_file_init(hstate_index(h));