This patch simply moves update_and_free_page() so that it can be reused
later in this patch series.  The implementation is not changed.

Signed-off-by: Adam Litke <[EMAIL PROTECTED]>
Acked-by: Andy Whitcroft <[EMAIL PROTECTED]>
Acked-by: Dave McCracken <[EMAIL PROTECTED]>
---

 mm/hugetlb.c |   30 +++++++++++++++---------------
 1 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index de4cf45..eb5b9f4 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -90,6 +90,21 @@ static struct page *dequeue_huge_page(struct vm_area_struct 
*vma,
        return page;
 }
 
+static void update_and_free_page(struct page *page)
+{
+       int i;
+       nr_huge_pages--;
+       nr_huge_pages_node[page_to_nid(page)]--;
+       for (i = 0; i < (HPAGE_SIZE / PAGE_SIZE); i++) {
+               page[i].flags &= ~(1 << PG_locked | 1 << PG_error | 1 << 
PG_referenced |
+                               1 << PG_dirty | 1 << PG_active | 1 << 
PG_reserved |
+                               1 << PG_private | 1<< PG_writeback);
+       }
+       set_compound_page_dtor(page, NULL);
+       set_page_refcounted(page);
+       __free_pages(page, HUGETLB_PAGE_ORDER);
+}
+
 static void free_huge_page(struct page *page)
 {
        BUG_ON(page_count(page));
@@ -199,21 +214,6 @@ static unsigned int cpuset_mems_nr(unsigned int *array)
 }
 
 #ifdef CONFIG_SYSCTL
-static void update_and_free_page(struct page *page)
-{
-       int i;
-       nr_huge_pages--;
-       nr_huge_pages_node[page_to_nid(page)]--;
-       for (i = 0; i < (HPAGE_SIZE / PAGE_SIZE); i++) {
-               page[i].flags &= ~(1 << PG_locked | 1 << PG_error | 1 << 
PG_referenced |
-                               1 << PG_dirty | 1 << PG_active | 1 << 
PG_reserved |
-                               1 << PG_private | 1<< PG_writeback);
-       }
-       set_compound_page_dtor(page, NULL);
-       set_page_refcounted(page);
-       __free_pages(page, HUGETLB_PAGE_ORDER);
-}
-
 #ifdef CONFIG_HIGHMEM
 static void try_to_free_low(unsigned long count)
 {

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Libhugetlbfs-devel mailing list
Libhugetlbfs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel

Reply via email to