These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / mm / hugetlb_cgroup.c
index 6e00574..d8fb10d 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));