Skip to content

Commit

Permalink
mm/hugetlb.c: fix build failure with !CONFIG_SYSCTL
Browse files Browse the repository at this point in the history
on !CONFIG_SYSCTL on x86 with latest -git i get:

     mm/hugetlb.c: In function 'decrement_hugepage_resv_vma':
     mm/hugetlb.c:83: error: 'reserve' undeclared (first use in this function)
     mm/hugetlb.c:83: error: (Each undeclared identifier is reported only once
     mm/hugetlb.c:83: error: for each function it appears in.)

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Ingo Molnar authored and Linus Torvalds committed Jul 25, 2008
1 parent 5047887 commit e44d1b2
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions mm/hugetlb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit e44d1b2

Please sign in to comment.