

Switch them over to page.lru


---

 25-akpm/arch/i386/mm/hugetlbpage.c    |   14 +++++++-------
 25-akpm/arch/ia64/mm/hugetlbpage.c    |   14 +++++++-------
 25-akpm/arch/ppc64/mm/hugetlbpage.c   |    8 ++++----
 25-akpm/arch/sh/mm/hugetlbpage.c      |   10 ++++------
 25-akpm/arch/sparc64/mm/hugetlbpage.c |   14 +++++++-------
 5 files changed, 29 insertions(+), 31 deletions(-)

diff -puN arch/i386/mm/hugetlbpage.c~hugetlb-stop-using-page-list arch/i386/mm/hugetlbpage.c
--- 25/arch/i386/mm/hugetlbpage.c~hugetlb-stop-using-page-list	2004-04-08 13:43:41.291203592 -0700
+++ 25-akpm/arch/i386/mm/hugetlbpage.c	2004-04-08 13:43:41.301202072 -0700
@@ -29,7 +29,7 @@ static spinlock_t htlbpage_lock = SPIN_L
 
 static void enqueue_huge_page(struct page *page)
 {
-	list_add(&page->list,
+	list_add(&page->lru,
 		&hugepage_freelists[page_zone(page)->zone_pgdat->node_id]);
 }
 
@@ -44,8 +44,8 @@ static struct page *dequeue_huge_page(vo
 				break;
 	}
 	if (nid >= 0 && nid < MAX_NUMNODES && !list_empty(&hugepage_freelists[nid])) {
-		page = list_entry(hugepage_freelists[nid].next, struct page, list);
-		list_del(&page->list);
+		page = list_entry(hugepage_freelists[nid].next, struct page, lru);
+		list_del(&page->lru);
 	}
 	return page;
 }
@@ -280,7 +280,7 @@ static void free_huge_page(struct page *
 	BUG_ON(page_count(page));
 	BUG_ON(page->mapping);
 
-	INIT_LIST_HEAD(&page->list);
+	INIT_LIST_HEAD(&page->lru);
 
 	spin_lock(&htlbpage_lock);
 	enqueue_huge_page(page);
@@ -409,19 +409,19 @@ static int try_to_free_low(int count)
 	/* all lowmem is on node 0 */
 	list_for_each(p, &hugepage_freelists[0]) {
 		if (map) {
-			list_del(&map->list);
+			list_del(&map->lru);
 			update_and_free_page(map);
 			htlbpagemem--;
 			map = NULL;
 			if (++count == 0)
 				break;
 		}
-		page = list_entry(p, struct page, list);
+		page = list_entry(p, struct page, lru);
 		if (!PageHighMem(page))
 			map = page;
 	}
 	if (map) {
-		list_del(&map->list);
+		list_del(&map->lru);
 		update_and_free_page(map);
 		htlbpagemem--;
 		count++;
diff -puN arch/ia64/mm/hugetlbpage.c~hugetlb-stop-using-page-list arch/ia64/mm/hugetlbpage.c
--- 25/arch/ia64/mm/hugetlbpage.c~hugetlb-stop-using-page-list	2004-04-08 13:43:41.293203288 -0700
+++ 25-akpm/arch/ia64/mm/hugetlbpage.c	2004-04-08 13:43:41.302201920 -0700
@@ -32,7 +32,7 @@ static spinlock_t htlbpage_lock = SPIN_L
 
 static void enqueue_huge_page(struct page *page)
 {
-	list_add(&page->list,
+	list_add(&page->lru,
 		&hugepage_freelists[page_zone(page)->zone_pgdat->node_id]);
 }
 
@@ -48,8 +48,8 @@ static struct page *dequeue_huge_page(vo
 	}
 	if (nid >= 0 && nid < MAX_NUMNODES &&
 	    !list_empty(&hugepage_freelists[nid])) {
-		page = list_entry(hugepage_freelists[nid].next, struct page, list);
-		list_del(&page->list);
+		page = list_entry(hugepage_freelists[nid].next, struct page, lru);
+		list_del(&page->lru);
 	}
 	return page;
 }
@@ -248,7 +248,7 @@ void free_huge_page(struct page *page)
 	BUG_ON(page_count(page));
 	BUG_ON(page->mapping);
 
-	INIT_LIST_HEAD(&page->list);
+	INIT_LIST_HEAD(&page->lru);
 
 	spin_lock(&htlbpage_lock);
 	enqueue_huge_page(page);
@@ -449,19 +449,19 @@ int try_to_free_low(int count)
 	spin_lock(&htlbpage_lock);
 	list_for_each(p, &hugepage_freelists[0]) {
 		if (map) {
-			list_del(&map->list);
+			list_del(&map->lru);
 			update_and_free_page(map);
 			htlbpagemem--;
 			map = NULL;
 			if (++count == 0)
 				break;
 		}
-		page = list_entry(p, struct page, list);
+		page = list_entry(p, struct page, lru);
 		if (!PageHighMem(page))
 			map = page;
 	}
 	if (map) {
-		list_del(&map->list);
+		list_del(&map->lru);
 		update_and_free_page(map);
 		htlbpagemem--;
 		count++;
diff -puN arch/ppc64/mm/hugetlbpage.c~hugetlb-stop-using-page-list arch/ppc64/mm/hugetlbpage.c
--- 25/arch/ppc64/mm/hugetlbpage.c~hugetlb-stop-using-page-list	2004-04-08 13:43:41.294203136 -0700
+++ 25-akpm/arch/ppc64/mm/hugetlbpage.c	2004-04-08 13:43:41.303201768 -0700
@@ -40,7 +40,7 @@ static struct list_head hugepage_freelis
 
 static void enqueue_huge_page(struct page *page)
 {
-	list_add(&page->list,
+	list_add(&page->lru,
 		&hugepage_freelists[page_zone(page)->zone_pgdat->node_id]);
 }
 
@@ -63,8 +63,8 @@ static struct page *dequeue_huge_page(vo
 	}
 
 	if (!list_empty(&hugepage_freelists[nid])) {
-		page = list_entry(hugepage_freelists[nid].next, struct page, list);
-		list_del(&page->list);
+		page = list_entry(hugepage_freelists[nid].next, struct page, lru);
+		list_del(&page->lru);
 	}
 
 	if (largepage_roundrobin)
@@ -452,7 +452,7 @@ static void free_huge_page(struct page *
 	BUG_ON(page_count(page));
 	BUG_ON(page->mapping);
 
-	INIT_LIST_HEAD(&page->list);
+	INIT_LIST_HEAD(&page->lru);
 
 	spin_lock(&htlbpage_lock);
 	enqueue_huge_page(page);
diff -puN arch/sparc64/mm/hugetlbpage.c~hugetlb-stop-using-page-list arch/sparc64/mm/hugetlbpage.c
--- 25/arch/sparc64/mm/hugetlbpage.c~hugetlb-stop-using-page-list	2004-04-08 13:43:41.296202832 -0700
+++ 25-akpm/arch/sparc64/mm/hugetlbpage.c	2004-04-08 13:43:41.304201616 -0700
@@ -29,7 +29,7 @@ static spinlock_t htlbpage_lock = SPIN_L
 
 static void enqueue_huge_page(struct page *page)
 {
-	list_add(&page->list,
+	list_add(&page->lru,
 		 &hugepage_freelists[page_zone(page)->zone_pgdat->node_id]);
 }
 
@@ -46,8 +46,8 @@ static struct page *dequeue_huge_page(vo
 	if (nid >= 0 && nid < MAX_NUMNODES &&
 	    !list_empty(&hugepage_freelists[nid])) {
 		page = list_entry(hugepage_freelists[nid].next,
-				  struct page, list);
-		list_del(&page->list);
+				  struct page, lru);
+		list_del(&page->lru);
 	}
 	return page;
 }
@@ -250,7 +250,7 @@ static void free_huge_page(struct page *
 	BUG_ON(page_count(page));
 	BUG_ON(page->mapping);
 
-	INIT_LIST_HEAD(&page->list);
+	INIT_LIST_HEAD(&page->lru);
 
 	spin_lock(&htlbpage_lock);
 	enqueue_huge_page(page);
@@ -384,19 +384,19 @@ static int try_to_free_low(int count)
 	/* all lowmem is on node 0 */
 	list_for_each(p, &hugepage_freelists[0]) {
 		if (map) {
-			list_del(&map->list);
+			list_del(&map->lru);
 			update_and_free_page(map);
 			htlbpagemem--;
 			map = NULL;
 			if (++count == 0)
 				break;
 		}
-		page = list_entry(p, struct page, list);
+		page = list_entry(p, struct page, lru);
 		if (!PageHighMem(page))
 			map = page;
 	}
 	if (map) {
-		list_del(&map->list);
+		list_del(&map->lru);
 		update_and_free_page(map);
 		htlbpagemem--;
 		count++;
diff -puN arch/sh/mm/hugetlbpage.c~hugetlb-stop-using-page-list arch/sh/mm/hugetlbpage.c
--- 25/arch/sh/mm/hugetlbpage.c~hugetlb-stop-using-page-list	2004-04-08 13:43:41.298202528 -0700
+++ 25-akpm/arch/sh/mm/hugetlbpage.c	2004-04-08 13:43:41.305201464 -0700
@@ -33,7 +33,7 @@ static spinlock_t htlbpage_lock = SPIN_L
 
 static void enqueue_huge_page(struct page *page)
 {
-	list_add(&page->list,
+	list_add(&page->lru,
 		 &hugepage_freelists[page_zone(page)->zone_pgdat->node_id]);
 }
 
@@ -51,7 +51,7 @@ static struct page *dequeue_huge_page(vo
 	    !list_empty(&hugepage_freelists[nid])) {
 		page = list_entry(hugepage_freelists[nid].next,
 				  struct page, list);
-		list_del(&page->list);
+		list_del(&page->lru);
 	}
 	return page;
 }
@@ -254,8 +254,6 @@ static void free_huge_page(struct page *
 	BUG_ON(page_count(page));
 	BUG_ON(page->mapping);
 
-	INIT_LIST_HEAD(&page->list);
-
 	spin_lock(&htlbpage_lock);
 	enqueue_huge_page(page);
 	htlbpagemem++;
@@ -388,7 +386,7 @@ static int try_to_free_low(int count)
 	/* all lowmem is on node 0 */
 	list_for_each(p, &hugepage_freelists[0]) {
 		if (map) {
-			list_del(&map->list);
+			list_del(&map->lru);
 			update_and_free_page(map);
 			htlbpagemem--;
 			map = NULL;
@@ -400,7 +398,7 @@ static int try_to_free_low(int count)
 			map = page;
 	}
 	if (map) {
-		list_del(&map->list);
+		list_del(&map->lru);
 		update_and_free_page(map);
 		htlbpagemem--;
 		count++;

_
