Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Kernel v2.6.24.6 /mm/hugetlb.c

Filename:/mm/hugetlb.c
Lines Added:11
Lines Deleted:1
Also changed in: (Previous) 2.6.24.5  2.6.24.4  2.6.24.4-rc3  2.6.24.4-rc2  2.6.24.4-rc1  2.6.24.3 
(Following) 2.6.24.7  2.6.25-git19  2.6.25-git20  2.6.25.14-rc1  2.6.25.14  2.6.25.15 

Location
[  2.6.24.6
  [  mm
     o  hugetlb.c

Patch

diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index db861d8..d95ce35 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -119,6 +119,7 @@ static void free_huge_page(struct page *page)
    struct address_space *mapping;
 
    mapping = (struct address_space *) page_private(page);
+   set_page_private(page, 0);
    BUG_ON(page_count(page));
    INIT_LIST_HEAD(&page->lru);
 
@@ -133,7 +134,6 @@ static void free_huge_page(struct page *page)
    spin_unlock(&hugetlb_lock);
    if (mapping)
       hugetlb_put_quota(mapping, 1);
-   set_page_private(page, 0);
 }
 
 /*
@@ -605,6 +605,16 @@ int hugetlb_treat_movable_handler(struct ctl_table *table, int write,
    return 0;
 }
 
+int hugetlb_overcommit_handler(struct ctl_table *table, int write,
+         struct file *file, void __user *buffer,
+         size_t *length, loff_t *ppos)
+{
+   spin_lock(&hugetlb_lock);
+   proc_doulongvec_minmax(table, write, file, buffer, length, ppos);
+   spin_unlock(&hugetlb_lock);
+   return 0;
+}
+
 #endif /* CONFIG_SYSCTL */
 
 int hugetlb_report_meminfo(char *buf)


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.