Skip to content

Commit 0b4d414

Browse files
ebiedermLinus Torvalds
authored andcommitted
[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>
1 parent ae83681 commit 0b4d414

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+75
-80
lines changed

arch/arm/kernel/isa.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,5 @@ register_isa_ports(unsigned int membase, unsigned int portbase, unsigned int por
7070
isa_membase = membase;
7171
isa_portbase = portbase;
7272
isa_portshift = portshift;
73-
isa_sysctl_header = register_sysctl_table(ctl_bus, 0);
73+
isa_sysctl_header = register_sysctl_table(ctl_bus);
7474
}

arch/frv/kernel/pm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ static struct ctl_table pm_dir_table[] =
455455
*/
456456
static int __init pm_init(void)
457457
{
458-
register_sysctl_table(pm_dir_table, 0);
458+
register_sysctl_table(pm_dir_table);
459459
return 0;
460460
}
461461

arch/frv/kernel/sysctl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ static struct ctl_table frv_dir_table[] =
216216
*/
217217
static int __init frv_sysctl_init(void)
218218
{
219-
register_sysctl_table(frv_dir_table, 0);
219+
register_sysctl_table(frv_dir_table);
220220
return 0;
221221
}
222222

arch/ia64/kernel/crash.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ machine_crash_setup(void)
222222
if((ret = register_die_notifier(&kdump_init_notifier_nb)) != 0)
223223
return ret;
224224
#ifdef CONFIG_SYSCTL
225-
register_sysctl_table(sys_table, 0);
225+
register_sysctl_table(sys_table);
226226
#endif
227227
return 0;
228228
}

arch/ia64/kernel/perfmon.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6726,7 +6726,7 @@ pfm_init(void)
67266726
/*
67276727
* create /proc/sys/kernel/perfmon (for debugging purposes)
67286728
*/
6729-
pfm_sysctl_header = register_sysctl_table(pfm_sysctl_root, 0);
6729+
pfm_sysctl_header = register_sysctl_table(pfm_sysctl_root);
67306730

67316731
/*
67326732
* initialize all our spinlocks

arch/ia64/sn/kernel/xpc_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1241,7 +1241,7 @@ xpc_init(void)
12411241
snprintf(xpc_part->bus_id, BUS_ID_SIZE, "part");
12421242
snprintf(xpc_chan->bus_id, BUS_ID_SIZE, "chan");
12431243

1244-
xpc_sysctl = register_sysctl_table(xpc_sys_dir, 0);
1244+
xpc_sysctl = register_sysctl_table(xpc_sys_dir);
12451245

12461246
/*
12471247
* The first few fields of each entry of xpc_partitions[] need to

arch/mips/au1000/common/power.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ static struct ctl_table pm_dir_table[] = {
461461
*/
462462
static int __init pm_init(void)
463463
{
464-
register_sysctl_table(pm_dir_table, 0);
464+
register_sysctl_table(pm_dir_table);
465465
return 0;
466466
}
467467

arch/mips/lasat/sysctl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ static int __init lasat_register_sysctl(void)
432432
struct ctl_table_header *lasat_table_header;
433433

434434
lasat_table_header =
435-
register_sysctl_table(lasat_root_table, 0);
435+
register_sysctl_table(lasat_root_table);
436436

437437
return 0;
438438
}

arch/powerpc/kernel/idle.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ static ctl_table powersave_nap_sysctl_root[] = {
125125
static int __init
126126
register_powersave_nap_sysctl(void)
127127
{
128-
register_sysctl_table(powersave_nap_sysctl_root, 0);
128+
register_sysctl_table(powersave_nap_sysctl_root);
129129

130130
return 0;
131131
}

arch/ppc/kernel/ppc_htab.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ static ctl_table htab_sysctl_root[] = {
457457
static int __init
458458
register_ppc_htab_sysctl(void)
459459
{
460-
register_sysctl_table(htab_sysctl_root, 0);
460+
register_sysctl_table(htab_sysctl_root);
461461

462462
return 0;
463463
}

0 commit comments

Comments
 (0)