Commit e44d1b2998d62a1f2f4d7eb17b56ba396535509f

Authored by Ingo Molnar
Committed by Linus Torvalds
1 parent 5047887caf

mm/hugetlb.c: fix build failure with !CONFIG_SYSCTL

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>

Showing 1 changed file with 11 additions and 11 deletions Side-by-side Diff

... ... @@ -1026,6 +1026,17 @@
1026 1026 }
1027 1027 }
1028 1028  
  1029 +static unsigned int cpuset_mems_nr(unsigned int *array)
  1030 +{
  1031 + int node;
  1032 + unsigned int nr = 0;
  1033 +
  1034 + for_each_node_mask(node, cpuset_current_mems_allowed)
  1035 + nr += array[node];
  1036 +
  1037 + return nr;
  1038 +}
  1039 +
1029 1040 #ifdef CONFIG_SYSCTL
1030 1041 #ifdef CONFIG_HIGHMEM
1031 1042 static void try_to_free_low(struct hstate *h, unsigned long count)
... ... @@ -1374,17 +1385,6 @@
1374 1385 return 1;
1375 1386 }
1376 1387 __setup("default_hugepagesz=", hugetlb_default_setup);
1377   -
1378   -static unsigned int cpuset_mems_nr(unsigned int *array)
1379   -{
1380   - int node;
1381   - unsigned int nr = 0;
1382   -
1383   - for_each_node_mask(node, cpuset_current_mems_allowed)
1384   - nr += array[node];
1385   -
1386   - return nr;
1387   -}
1388 1388  
1389 1389 int hugetlb_sysctl_handler(struct ctl_table *table, int write,
1390 1390 struct file *file, void __user *buffer,