diff options
Diffstat (limited to 'mm/hugetlb.c')
-rw-r--r-- | mm/hugetlb.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 06fd80149e47..ba029d640740 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c | |||
@@ -92,6 +92,21 @@ static struct page *dequeue_huge_page(struct vm_area_struct *vma, | |||
92 | return page; | 92 | return page; |
93 | } | 93 | } |
94 | 94 | ||
95 | static void update_and_free_page(struct page *page) | ||
96 | { | ||
97 | int i; | ||
98 | nr_huge_pages--; | ||
99 | nr_huge_pages_node[page_to_nid(page)]--; | ||
100 | for (i = 0; i < (HPAGE_SIZE / PAGE_SIZE); i++) { | ||
101 | page[i].flags &= ~(1 << PG_locked | 1 << PG_error | 1 << PG_referenced | | ||
102 | 1 << PG_dirty | 1 << PG_active | 1 << PG_reserved | | ||
103 | 1 << PG_private | 1<< PG_writeback); | ||
104 | } | ||
105 | set_compound_page_dtor(page, NULL); | ||
106 | set_page_refcounted(page); | ||
107 | __free_pages(page, HUGETLB_PAGE_ORDER); | ||
108 | } | ||
109 | |||
95 | static void free_huge_page(struct page *page) | 110 | static void free_huge_page(struct page *page) |
96 | { | 111 | { |
97 | BUG_ON(page_count(page)); | 112 | BUG_ON(page_count(page)); |
@@ -201,21 +216,6 @@ static unsigned int cpuset_mems_nr(unsigned int *array) | |||
201 | } | 216 | } |
202 | 217 | ||
203 | #ifdef CONFIG_SYSCTL | 218 | #ifdef CONFIG_SYSCTL |
204 | static void update_and_free_page(struct page *page) | ||
205 | { | ||
206 | int i; | ||
207 | nr_huge_pages--; | ||
208 | nr_huge_pages_node[page_to_nid(page)]--; | ||
209 | for (i = 0; i < (HPAGE_SIZE / PAGE_SIZE); i++) { | ||
210 | page[i].flags &= ~(1 << PG_locked | 1 << PG_error | 1 << PG_referenced | | ||
211 | 1 << PG_dirty | 1 << PG_active | 1 << PG_reserved | | ||
212 | 1 << PG_private | 1<< PG_writeback); | ||
213 | } | ||
214 | set_compound_page_dtor(page, NULL); | ||
215 | set_page_refcounted(page); | ||
216 | __free_pages(page, HUGETLB_PAGE_ORDER); | ||
217 | } | ||
218 | |||
219 | #ifdef CONFIG_HIGHMEM | 219 | #ifdef CONFIG_HIGHMEM |
220 | static void try_to_free_low(unsigned long count) | 220 | static void try_to_free_low(unsigned long count) |
221 | { | 221 | { |