aboutsummaryrefslogtreecommitdiffstats
path: root/mm/hugetlb.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/hugetlb.c')
-rw-r--r--mm/hugetlb.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index d5971597736b..efe29b53daff 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -28,6 +28,7 @@
28 28
29#include <linux/io.h> 29#include <linux/io.h>
30#include <linux/hugetlb.h> 30#include <linux/hugetlb.h>
31#include <linux/hugetlb_cgroup.h>
31#include <linux/node.h> 32#include <linux/node.h>
32#include "internal.h" 33#include "internal.h"
33 34
@@ -591,6 +592,7 @@ static void update_and_free_page(struct hstate *h, struct page *page)
591 1 << PG_active | 1 << PG_reserved | 592 1 << PG_active | 1 << PG_reserved |
592 1 << PG_private | 1 << PG_writeback); 593 1 << PG_private | 1 << PG_writeback);
593 } 594 }
595 VM_BUG_ON(hugetlb_cgroup_from_page(page));
594 set_compound_page_dtor(page, NULL); 596 set_compound_page_dtor(page, NULL);
595 set_page_refcounted(page); 597 set_page_refcounted(page);
596 arch_release_hugepage(page); 598 arch_release_hugepage(page);
@@ -643,6 +645,7 @@ static void prep_new_huge_page(struct hstate *h, struct page *page, int nid)
643 INIT_LIST_HEAD(&page->lru); 645 INIT_LIST_HEAD(&page->lru);
644 set_compound_page_dtor(page, free_huge_page); 646 set_compound_page_dtor(page, free_huge_page);
645 spin_lock(&hugetlb_lock); 647 spin_lock(&hugetlb_lock);
648 set_hugetlb_cgroup(page, NULL);
646 h->nr_huge_pages++; 649 h->nr_huge_pages++;
647 h->nr_huge_pages_node[nid]++; 650 h->nr_huge_pages_node[nid]++;
648 spin_unlock(&hugetlb_lock); 651 spin_unlock(&hugetlb_lock);
@@ -892,6 +895,7 @@ static struct page *alloc_buddy_huge_page(struct hstate *h, int nid)
892 INIT_LIST_HEAD(&page->lru); 895 INIT_LIST_HEAD(&page->lru);
893 r_nid = page_to_nid(page); 896 r_nid = page_to_nid(page);
894 set_compound_page_dtor(page, free_huge_page); 897 set_compound_page_dtor(page, free_huge_page);
898 set_hugetlb_cgroup(page, NULL);
895 /* 899 /*
896 * We incremented the global counters already 900 * We incremented the global counters already
897 */ 901 */