aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-04-26 09:02:14 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-04-26 09:02:14 -0700
commit6d576c069f9f56d719cb42e5631082ad935696c1 (patch)
tree1d861ba57fbf2c5318984ba3996b48821b7613c0 /mm
parent65ea1afff7c4b1453996a7f8713dd132e5118a7c (diff)
downloadhistory-6d576c069f9f56d719cb42e5631082ad935696c1.tar.gz
[PATCH] hugepage fixes
From: William Lee Irwin III <wli@holomorphy.com> mm/hugetlb.c is putting the destructor in head->lru.prev not head[1].mapping; fix below along with nuking huge_page_release(), which simply duplicates put_page().
Diffstat (limited to 'mm')
-rw-r--r--mm/hugetlb.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 403ef15a66f092..6acf0d8144549e 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -78,20 +78,12 @@ struct page *alloc_huge_page(void)
free_huge_pages--;
spin_unlock(&hugetlb_lock);
set_page_count(page, 1);
- page->lru.prev = (void *)free_huge_page;
+ page[1].mapping = (void *)free_huge_page;
for (i = 0; i < (HPAGE_SIZE/PAGE_SIZE); ++i)
clear_highpage(&page[i]);
return page;
}
-void huge_page_release(struct page *page)
-{
- if (!put_page_testzero(page))
- return;
-
- free_huge_page(page);
-}
-
static int __init hugetlb_init(void)
{
unsigned long i;