aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorDavid Rientjes <rientjes@google.com>2014-08-06 19:06:54 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-06 21:01:19 -0400
commited4d4902ebdd7ca8b5a51daaf6bebf4b172895cc (patch)
treed2da9377a11a90047d640c554220a3cfb4d1249c /kernel
parent238d3c13f0cce38752072dc90f4e828abdfec143 (diff)
mm, hugetlb: remove hugetlb_zero and hugetlb_infinity
They are unnecessary: "zero" can be used in place of "hugetlb_zero" and passing extra2 == NULL is equivalent to infinity. Signed-off-by: David Rientjes <rientjes@google.com> Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com> Reviewed-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sysctl.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 75b22e22a72c..75875a741b5e 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -1240,8 +1240,7 @@ static struct ctl_table vm_table[] = {
1240 .maxlen = sizeof(unsigned long), 1240 .maxlen = sizeof(unsigned long),
1241 .mode = 0644, 1241 .mode = 0644,
1242 .proc_handler = hugetlb_sysctl_handler, 1242 .proc_handler = hugetlb_sysctl_handler,
1243 .extra1 = (void *)&hugetlb_zero, 1243 .extra1 = &zero,
1244 .extra2 = (void *)&hugetlb_infinity,
1245 }, 1244 },
1246#ifdef CONFIG_NUMA 1245#ifdef CONFIG_NUMA
1247 { 1246 {
@@ -1250,8 +1249,7 @@ static struct ctl_table vm_table[] = {
1250 .maxlen = sizeof(unsigned long), 1249 .maxlen = sizeof(unsigned long),
1251 .mode = 0644, 1250 .mode = 0644,
1252 .proc_handler = &hugetlb_mempolicy_sysctl_handler, 1251 .proc_handler = &hugetlb_mempolicy_sysctl_handler,
1253 .extra1 = (void *)&hugetlb_zero, 1252 .extra1 = &zero,
1254 .extra2 = (void *)&hugetlb_infinity,
1255 }, 1253 },
1256#endif 1254#endif
1257 { 1255 {
@@ -1274,8 +1272,7 @@ static struct ctl_table vm_table[] = {
1274 .maxlen = sizeof(unsigned long), 1272 .maxlen = sizeof(unsigned long),
1275 .mode = 0644, 1273 .mode = 0644,
1276 .proc_handler = hugetlb_overcommit_handler, 1274 .proc_handler = hugetlb_overcommit_handler,
1277 .extra1 = (void *)&hugetlb_zero, 1275 .extra1 = &zero,
1278 .extra2 = (void *)&hugetlb_infinity,
1279 }, 1276 },
1280#endif 1277#endif
1281 { 1278 {