diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2007-02-14 03:34:09 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-14 11:09:59 -0500 |
commit | 0b4d414714f0d2f922d39424b0c5c82ad900a381 (patch) | |
tree | 5079ec59a5622c9cacfe0fce484ba2c4626c406f /arch | |
parent | ae836810263509ff7a3c2c021754ce6f66b3fab6 (diff) |
[PATCH] sysctl: remove insert_at_head from register_sysctl
The semantic effect of insert_at_head is that it would allow new registered
sysctl entries to override existing sysctl entries of the same name. Which is
pain for caching and the proc interface never implemented.
I have done an audit and discovered that none of the current users of
register_sysctl care as (excpet for directories) they do not register
duplicate sysctl entries.
So this patch simply removes the support for overriding existing entries in
the sys_sysctl interface since no one uses it or cares and it makes future
enhancments harder.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: David Howells <dhowells@redhat.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Andi Kleen <ak@muc.de>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Corey Minyard <minyard@acm.org>
Cc: Neil Brown <neilb@suse.de>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Cc: Jan Kara <jack@ucw.cz>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: Mark Fasheh <mark.fasheh@oracle.com>
Cc: David Chinner <dgc@sgi.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Patrick McHardy <kaber@trash.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/kernel/isa.c | 2 | ||||
-rw-r--r-- | arch/frv/kernel/pm.c | 2 | ||||
-rw-r--r-- | arch/frv/kernel/sysctl.c | 2 | ||||
-rw-r--r-- | arch/ia64/kernel/crash.c | 2 | ||||
-rw-r--r-- | arch/ia64/kernel/perfmon.c | 2 | ||||
-rw-r--r-- | arch/ia64/sn/kernel/xpc_main.c | 2 | ||||
-rw-r--r-- | arch/mips/au1000/common/power.c | 2 | ||||
-rw-r--r-- | arch/mips/lasat/sysctl.c | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/idle.c | 2 | ||||
-rw-r--r-- | arch/ppc/kernel/ppc_htab.c | 2 | ||||
-rw-r--r-- | arch/s390/appldata/appldata_base.c | 4 | ||||
-rw-r--r-- | arch/s390/kernel/debug.c | 2 | ||||
-rw-r--r-- | arch/s390/mm/cmm.c | 2 | ||||
-rw-r--r-- | arch/sh64/kernel/traps.c | 2 | ||||
-rw-r--r-- | arch/x86_64/ia32/ia32_binfmt.c | 2 | ||||
-rw-r--r-- | arch/x86_64/kernel/vsyscall.c | 2 | ||||
-rw-r--r-- | arch/x86_64/mm/init.c | 2 |
17 files changed, 18 insertions, 18 deletions
diff --git a/arch/arm/kernel/isa.c b/arch/arm/kernel/isa.c index 54bbd9fe255c..50a30bc91872 100644 --- a/arch/arm/kernel/isa.c +++ b/arch/arm/kernel/isa.c | |||
@@ -70,5 +70,5 @@ register_isa_ports(unsigned int membase, unsigned int portbase, unsigned int por | |||
70 | isa_membase = membase; | 70 | isa_membase = membase; |
71 | isa_portbase = portbase; | 71 | isa_portbase = portbase; |
72 | isa_portshift = portshift; | 72 | isa_portshift = portshift; |
73 | isa_sysctl_header = register_sysctl_table(ctl_bus, 0); | 73 | isa_sysctl_header = register_sysctl_table(ctl_bus); |
74 | } | 74 | } |
diff --git a/arch/frv/kernel/pm.c b/arch/frv/kernel/pm.c index aa503338985f..c57ce3f1f2e2 100644 --- a/arch/frv/kernel/pm.c +++ b/arch/frv/kernel/pm.c | |||
@@ -455,7 +455,7 @@ static struct ctl_table pm_dir_table[] = | |||
455 | */ | 455 | */ |
456 | static int __init pm_init(void) | 456 | static int __init pm_init(void) |
457 | { | 457 | { |
458 | register_sysctl_table(pm_dir_table, 0); | 458 | register_sysctl_table(pm_dir_table); |
459 | return 0; | 459 | return 0; |
460 | } | 460 | } |
461 | 461 | ||
diff --git a/arch/frv/kernel/sysctl.c b/arch/frv/kernel/sysctl.c index 577ad16cf840..3e9d7e03fb95 100644 --- a/arch/frv/kernel/sysctl.c +++ b/arch/frv/kernel/sysctl.c | |||
@@ -216,7 +216,7 @@ static struct ctl_table frv_dir_table[] = | |||
216 | */ | 216 | */ |
217 | static int __init frv_sysctl_init(void) | 217 | static int __init frv_sysctl_init(void) |
218 | { | 218 | { |
219 | register_sysctl_table(frv_dir_table, 0); | 219 | register_sysctl_table(frv_dir_table); |
220 | return 0; | 220 | return 0; |
221 | } | 221 | } |
222 | 222 | ||
diff --git a/arch/ia64/kernel/crash.c b/arch/ia64/kernel/crash.c index 37bb16f07fc3..5cdd2f5fa064 100644 --- a/arch/ia64/kernel/crash.c +++ b/arch/ia64/kernel/crash.c | |||
@@ -222,7 +222,7 @@ machine_crash_setup(void) | |||
222 | if((ret = register_die_notifier(&kdump_init_notifier_nb)) != 0) | 222 | if((ret = register_die_notifier(&kdump_init_notifier_nb)) != 0) |
223 | return ret; | 223 | return ret; |
224 | #ifdef CONFIG_SYSCTL | 224 | #ifdef CONFIG_SYSCTL |
225 | register_sysctl_table(sys_table, 0); | 225 | register_sysctl_table(sys_table); |
226 | #endif | 226 | #endif |
227 | return 0; | 227 | return 0; |
228 | } | 228 | } |
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index d2f299d98977..2ecb20b551e1 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c | |||
@@ -6726,7 +6726,7 @@ pfm_init(void) | |||
6726 | /* | 6726 | /* |
6727 | * create /proc/sys/kernel/perfmon (for debugging purposes) | 6727 | * create /proc/sys/kernel/perfmon (for debugging purposes) |
6728 | */ | 6728 | */ |
6729 | pfm_sysctl_header = register_sysctl_table(pfm_sysctl_root, 0); | 6729 | pfm_sysctl_header = register_sysctl_table(pfm_sysctl_root); |
6730 | 6730 | ||
6731 | /* | 6731 | /* |
6732 | * initialize all our spinlocks | 6732 | * initialize all our spinlocks |
diff --git a/arch/ia64/sn/kernel/xpc_main.c b/arch/ia64/sn/kernel/xpc_main.c index e04f7b5f2aab..68355ef6f841 100644 --- a/arch/ia64/sn/kernel/xpc_main.c +++ b/arch/ia64/sn/kernel/xpc_main.c | |||
@@ -1241,7 +1241,7 @@ xpc_init(void) | |||
1241 | snprintf(xpc_part->bus_id, BUS_ID_SIZE, "part"); | 1241 | snprintf(xpc_part->bus_id, BUS_ID_SIZE, "part"); |
1242 | snprintf(xpc_chan->bus_id, BUS_ID_SIZE, "chan"); | 1242 | snprintf(xpc_chan->bus_id, BUS_ID_SIZE, "chan"); |
1243 | 1243 | ||
1244 | xpc_sysctl = register_sysctl_table(xpc_sys_dir, 0); | 1244 | xpc_sysctl = register_sysctl_table(xpc_sys_dir); |
1245 | 1245 | ||
1246 | /* | 1246 | /* |
1247 | * The first few fields of each entry of xpc_partitions[] need to | 1247 | * The first few fields of each entry of xpc_partitions[] need to |
diff --git a/arch/mips/au1000/common/power.c b/arch/mips/au1000/common/power.c index 31256b85df6d..3901e8e04755 100644 --- a/arch/mips/au1000/common/power.c +++ b/arch/mips/au1000/common/power.c | |||
@@ -461,7 +461,7 @@ static struct ctl_table pm_dir_table[] = { | |||
461 | */ | 461 | */ |
462 | static int __init pm_init(void) | 462 | static int __init pm_init(void) |
463 | { | 463 | { |
464 | register_sysctl_table(pm_dir_table, 0); | 464 | register_sysctl_table(pm_dir_table); |
465 | return 0; | 465 | return 0; |
466 | } | 466 | } |
467 | 467 | ||
diff --git a/arch/mips/lasat/sysctl.c b/arch/mips/lasat/sysctl.c index c04e82fb9d59..699ab1886ceb 100644 --- a/arch/mips/lasat/sysctl.c +++ b/arch/mips/lasat/sysctl.c | |||
@@ -432,7 +432,7 @@ static int __init lasat_register_sysctl(void) | |||
432 | struct ctl_table_header *lasat_table_header; | 432 | struct ctl_table_header *lasat_table_header; |
433 | 433 | ||
434 | lasat_table_header = | 434 | lasat_table_header = |
435 | register_sysctl_table(lasat_root_table, 0); | 435 | register_sysctl_table(lasat_root_table); |
436 | 436 | ||
437 | return 0; | 437 | return 0; |
438 | } | 438 | } |
diff --git a/arch/powerpc/kernel/idle.c b/arch/powerpc/kernel/idle.c index 8b27bb1a5b31..6e7f50967bab 100644 --- a/arch/powerpc/kernel/idle.c +++ b/arch/powerpc/kernel/idle.c | |||
@@ -125,7 +125,7 @@ static ctl_table powersave_nap_sysctl_root[] = { | |||
125 | static int __init | 125 | static int __init |
126 | register_powersave_nap_sysctl(void) | 126 | register_powersave_nap_sysctl(void) |
127 | { | 127 | { |
128 | register_sysctl_table(powersave_nap_sysctl_root, 0); | 128 | register_sysctl_table(powersave_nap_sysctl_root); |
129 | 129 | ||
130 | return 0; | 130 | return 0; |
131 | } | 131 | } |
diff --git a/arch/ppc/kernel/ppc_htab.c b/arch/ppc/kernel/ppc_htab.c index 77b20ff672b8..0a7e42d54eaf 100644 --- a/arch/ppc/kernel/ppc_htab.c +++ b/arch/ppc/kernel/ppc_htab.c | |||
@@ -457,7 +457,7 @@ static ctl_table htab_sysctl_root[] = { | |||
457 | static int __init | 457 | static int __init |
458 | register_ppc_htab_sysctl(void) | 458 | register_ppc_htab_sysctl(void) |
459 | { | 459 | { |
460 | register_sysctl_table(htab_sysctl_root, 0); | 460 | register_sysctl_table(htab_sysctl_root); |
461 | 461 | ||
462 | return 0; | 462 | return 0; |
463 | } | 463 | } |
diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c index 58cefcf2d2cc..0c3cf4b16ae4 100644 --- a/arch/s390/appldata/appldata_base.c +++ b/arch/s390/appldata/appldata_base.c | |||
@@ -506,7 +506,7 @@ int appldata_register_ops(struct appldata_ops *ops) | |||
506 | 506 | ||
507 | ops->ctl_table[3].ctl_name = 0; | 507 | ops->ctl_table[3].ctl_name = 0; |
508 | 508 | ||
509 | ops->sysctl_header = register_sysctl_table(ops->ctl_table,0); | 509 | ops->sysctl_header = register_sysctl_table(ops->ctl_table); |
510 | 510 | ||
511 | P_INFO("%s-ops registered!\n", ops->name); | 511 | P_INFO("%s-ops registered!\n", ops->name); |
512 | return 0; | 512 | return 0; |
@@ -606,7 +606,7 @@ static int __init appldata_init(void) | |||
606 | /* Register cpu hotplug notifier */ | 606 | /* Register cpu hotplug notifier */ |
607 | register_hotcpu_notifier(&appldata_nb); | 607 | register_hotcpu_notifier(&appldata_nb); |
608 | 608 | ||
609 | appldata_sysctl_header = register_sysctl_table(appldata_dir_table, 0); | 609 | appldata_sysctl_header = register_sysctl_table(appldata_dir_table); |
610 | #ifdef MODULE | 610 | #ifdef MODULE |
611 | appldata_dir_table[0].de->owner = THIS_MODULE; | 611 | appldata_dir_table[0].de->owner = THIS_MODULE; |
612 | appldata_table[0].de->owner = THIS_MODULE; | 612 | appldata_table[0].de->owner = THIS_MODULE; |
diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c index 1b95148dc73b..eca3fe595ff4 100644 --- a/arch/s390/kernel/debug.c +++ b/arch/s390/kernel/debug.c | |||
@@ -1053,7 +1053,7 @@ __init debug_init(void) | |||
1053 | { | 1053 | { |
1054 | int rc = 0; | 1054 | int rc = 0; |
1055 | 1055 | ||
1056 | s390dbf_sysctl_header = register_sysctl_table(s390dbf_dir_table, 0); | 1056 | s390dbf_sysctl_header = register_sysctl_table(s390dbf_dir_table); |
1057 | down(&debug_lock); | 1057 | down(&debug_lock); |
1058 | debug_debugfs_root_entry = debugfs_create_dir(DEBUG_DIR_ROOT,NULL); | 1058 | debug_debugfs_root_entry = debugfs_create_dir(DEBUG_DIR_ROOT,NULL); |
1059 | printk(KERN_INFO "debug: Initialization complete\n"); | 1059 | printk(KERN_INFO "debug: Initialization complete\n"); |
diff --git a/arch/s390/mm/cmm.c b/arch/s390/mm/cmm.c index c6d6ddeb5e33..c5b2f4f078bc 100644 --- a/arch/s390/mm/cmm.c +++ b/arch/s390/mm/cmm.c | |||
@@ -418,7 +418,7 @@ cmm_init (void) | |||
418 | int rc = -ENOMEM; | 418 | int rc = -ENOMEM; |
419 | 419 | ||
420 | #ifdef CONFIG_CMM_PROC | 420 | #ifdef CONFIG_CMM_PROC |
421 | cmm_sysctl_header = register_sysctl_table(cmm_dir_table, 0); | 421 | cmm_sysctl_header = register_sysctl_table(cmm_dir_table); |
422 | if (!cmm_sysctl_header) | 422 | if (!cmm_sysctl_header) |
423 | goto out; | 423 | goto out; |
424 | #endif | 424 | #endif |
diff --git a/arch/sh64/kernel/traps.c b/arch/sh64/kernel/traps.c index 02cca742cf03..c346d7ef9280 100644 --- a/arch/sh64/kernel/traps.c +++ b/arch/sh64/kernel/traps.c | |||
@@ -960,7 +960,7 @@ static ctl_table sh64_root[] = { | |||
960 | static struct ctl_table_header *sysctl_header; | 960 | static struct ctl_table_header *sysctl_header; |
961 | static int __init init_sysctl(void) | 961 | static int __init init_sysctl(void) |
962 | { | 962 | { |
963 | sysctl_header = register_sysctl_table(sh64_root, 0); | 963 | sysctl_header = register_sysctl_table(sh64_root); |
964 | return 0; | 964 | return 0; |
965 | } | 965 | } |
966 | 966 | ||
diff --git a/arch/x86_64/ia32/ia32_binfmt.c b/arch/x86_64/ia32/ia32_binfmt.c index 354a0a01ec2d..071100ea1251 100644 --- a/arch/x86_64/ia32/ia32_binfmt.c +++ b/arch/x86_64/ia32/ia32_binfmt.c | |||
@@ -367,7 +367,7 @@ static ctl_table abi_root_table2[] = { | |||
367 | 367 | ||
368 | static __init int ia32_binfmt_init(void) | 368 | static __init int ia32_binfmt_init(void) |
369 | { | 369 | { |
370 | register_sysctl_table(abi_root_table2, 0); | 370 | register_sysctl_table(abi_root_table2); |
371 | return 0; | 371 | return 0; |
372 | } | 372 | } |
373 | __initcall(ia32_binfmt_init); | 373 | __initcall(ia32_binfmt_init); |
diff --git a/arch/x86_64/kernel/vsyscall.c b/arch/x86_64/kernel/vsyscall.c index c0e2b48be308..313dc6ad780b 100644 --- a/arch/x86_64/kernel/vsyscall.c +++ b/arch/x86_64/kernel/vsyscall.c | |||
@@ -301,7 +301,7 @@ static int __init vsyscall_init(void) | |||
301 | BUG_ON((unsigned long) &vgetcpu != VSYSCALL_ADDR(__NR_vgetcpu)); | 301 | BUG_ON((unsigned long) &vgetcpu != VSYSCALL_ADDR(__NR_vgetcpu)); |
302 | map_vsyscall(); | 302 | map_vsyscall(); |
303 | #ifdef CONFIG_SYSCTL | 303 | #ifdef CONFIG_SYSCTL |
304 | register_sysctl_table(kernel_root_table2, 0); | 304 | register_sysctl_table(kernel_root_table2); |
305 | #endif | 305 | #endif |
306 | on_each_cpu(cpu_vsyscall_init, NULL, 0, 1); | 306 | on_each_cpu(cpu_vsyscall_init, NULL, 0, 1); |
307 | hotcpu_notifier(cpu_vsyscall_notifier, 0); | 307 | hotcpu_notifier(cpu_vsyscall_notifier, 0); |
diff --git a/arch/x86_64/mm/init.c b/arch/x86_64/mm/init.c index a5c12ea57683..ec31534eb104 100644 --- a/arch/x86_64/mm/init.c +++ b/arch/x86_64/mm/init.c | |||
@@ -734,7 +734,7 @@ static ctl_table debug_root_table2[] = { | |||
734 | 734 | ||
735 | static __init int x8664_sysctl_init(void) | 735 | static __init int x8664_sysctl_init(void) |
736 | { | 736 | { |
737 | register_sysctl_table(debug_root_table2, 0); | 737 | register_sysctl_table(debug_root_table2); |
738 | return 0; | 738 | return 0; |
739 | } | 739 | } |
740 | __initcall(x8664_sysctl_init); | 740 | __initcall(x8664_sysctl_init); |