diff options
Diffstat (limited to 'mm/hugetlb.c')
-rw-r--r-- | mm/hugetlb.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 39d49ecea8e8..20117a4b8ab6 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <asm/pgtable.h> | 18 | #include <asm/pgtable.h> |
19 | 19 | ||
20 | #include <linux/hugetlb.h> | 20 | #include <linux/hugetlb.h> |
21 | #include "internal.h" | ||
21 | 22 | ||
22 | const unsigned long hugetlb_zero = 0, hugetlb_infinity = ~0UL; | 23 | const unsigned long hugetlb_zero = 0, hugetlb_infinity = ~0UL; |
23 | static unsigned long nr_huge_pages, free_huge_pages; | 24 | static unsigned long nr_huge_pages, free_huge_pages; |
@@ -106,7 +107,7 @@ struct page *alloc_huge_page(struct vm_area_struct *vma, unsigned long addr) | |||
106 | return NULL; | 107 | return NULL; |
107 | } | 108 | } |
108 | spin_unlock(&hugetlb_lock); | 109 | spin_unlock(&hugetlb_lock); |
109 | set_page_count(page, 1); | 110 | set_page_refcounted(page); |
110 | for (i = 0; i < (HPAGE_SIZE/PAGE_SIZE); ++i) | 111 | for (i = 0; i < (HPAGE_SIZE/PAGE_SIZE); ++i) |
111 | clear_user_highpage(&page[i], addr); | 112 | clear_user_highpage(&page[i], addr); |
112 | return page; | 113 | return page; |
@@ -152,7 +153,7 @@ static void update_and_free_page(struct page *page) | |||
152 | 1 << PG_private | 1<< PG_writeback); | 153 | 1 << PG_private | 1<< PG_writeback); |
153 | } | 154 | } |
154 | page[1].lru.next = NULL; | 155 | page[1].lru.next = NULL; |
155 | set_page_count(page, 1); | 156 | set_page_refcounted(page); |
156 | __free_pages(page, HUGETLB_PAGE_ORDER); | 157 | __free_pages(page, HUGETLB_PAGE_ORDER); |
157 | } | 158 | } |
158 | 159 | ||