]> err.no Git - linux-2.6/blobdiff - mm/hugetlb.c
mm/hugetlb.c: fix build failure with !CONFIG_SYSCTL
[linux-2.6] / mm / hugetlb.c
index 41341c414194b6e6fbc25b92bd8ae4eb1ca384d6..a8bf4ab01f86b5d0b2bab44bccb4ec5351a23d79 100644 (file)
@@ -1026,6 +1026,17 @@ static void __init report_hugepages(void)
        }
 }
 
+static unsigned int cpuset_mems_nr(unsigned int *array)
+{
+       int node;
+       unsigned int nr = 0;
+
+       for_each_node_mask(node, cpuset_current_mems_allowed)
+               nr += array[node];
+
+       return nr;
+}
+
 #ifdef CONFIG_SYSCTL
 #ifdef CONFIG_HIGHMEM
 static void try_to_free_low(struct hstate *h, unsigned long count)
@@ -1375,17 +1386,6 @@ static int __init hugetlb_default_setup(char *s)
 }
 __setup("default_hugepagesz=", hugetlb_default_setup);
 
-static unsigned int cpuset_mems_nr(unsigned int *array)
-{
-       int node;
-       unsigned int nr = 0;
-
-       for_each_node_mask(node, cpuset_current_mems_allowed)
-               nr += array[node];
-
-       return nr;
-}
-
 int hugetlb_sysctl_handler(struct ctl_table *table, int write,
                           struct file *file, void __user *buffer,
                           size_t *length, loff_t *ppos)