mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 21:40:53 +07:00
0b4d414714
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>
116 lines
2.6 KiB
C
116 lines
2.6 KiB
C
/* -*- linux-c -*-
|
|
* sysctl_net_x25.c: sysctl interface to net X.25 subsystem.
|
|
*
|
|
* Begun April 1, 1996, Mike Shaver.
|
|
* Added /proc/sys/net/x25 directory entry (empty =) ). [MS]
|
|
*/
|
|
|
|
#include <linux/sysctl.h>
|
|
#include <linux/skbuff.h>
|
|
#include <linux/socket.h>
|
|
#include <linux/netdevice.h>
|
|
#include <linux/init.h>
|
|
#include <net/x25.h>
|
|
|
|
static int min_timer[] = { 1 * HZ };
|
|
static int max_timer[] = { 300 * HZ };
|
|
|
|
static struct ctl_table_header *x25_table_header;
|
|
|
|
static struct ctl_table x25_table[] = {
|
|
{
|
|
.ctl_name = NET_X25_RESTART_REQUEST_TIMEOUT,
|
|
.procname = "restart_request_timeout",
|
|
.data = &sysctl_x25_restart_request_timeout,
|
|
.maxlen = sizeof(int),
|
|
.mode = 0644,
|
|
.proc_handler = &proc_dointvec_minmax,
|
|
.strategy = &sysctl_intvec,
|
|
.extra1 = &min_timer,
|
|
.extra2 = &max_timer,
|
|
},
|
|
{
|
|
.ctl_name = NET_X25_CALL_REQUEST_TIMEOUT,
|
|
.procname = "call_request_timeout",
|
|
.data = &sysctl_x25_call_request_timeout,
|
|
.maxlen = sizeof(int),
|
|
.mode = 0644,
|
|
.proc_handler = &proc_dointvec_minmax,
|
|
.strategy = &sysctl_intvec,
|
|
.extra1 = &min_timer,
|
|
.extra2 = &max_timer,
|
|
},
|
|
{
|
|
.ctl_name = NET_X25_RESET_REQUEST_TIMEOUT,
|
|
.procname = "reset_request_timeout",
|
|
.data = &sysctl_x25_reset_request_timeout,
|
|
.maxlen = sizeof(int),
|
|
.mode = 0644,
|
|
.proc_handler = &proc_dointvec_minmax,
|
|
.strategy = &sysctl_intvec,
|
|
.extra1 = &min_timer,
|
|
.extra2 = &max_timer,
|
|
},
|
|
{
|
|
.ctl_name = NET_X25_CLEAR_REQUEST_TIMEOUT,
|
|
.procname = "clear_request_timeout",
|
|
.data = &sysctl_x25_clear_request_timeout,
|
|
.maxlen = sizeof(int),
|
|
.mode = 0644,
|
|
.proc_handler = &proc_dointvec_minmax,
|
|
.strategy = &sysctl_intvec,
|
|
.extra1 = &min_timer,
|
|
.extra2 = &max_timer,
|
|
},
|
|
{
|
|
.ctl_name = NET_X25_ACK_HOLD_BACK_TIMEOUT,
|
|
.procname = "acknowledgement_hold_back_timeout",
|
|
.data = &sysctl_x25_ack_holdback_timeout,
|
|
.maxlen = sizeof(int),
|
|
.mode = 0644,
|
|
.proc_handler = &proc_dointvec_minmax,
|
|
.strategy = &sysctl_intvec,
|
|
.extra1 = &min_timer,
|
|
.extra2 = &max_timer,
|
|
},
|
|
{
|
|
.ctl_name = NET_X25_FORWARD,
|
|
.procname = "x25_forward",
|
|
.data = &sysctl_x25_forward,
|
|
.maxlen = sizeof(int),
|
|
.mode = 0644,
|
|
.proc_handler = &proc_dointvec,
|
|
},
|
|
{ 0, },
|
|
};
|
|
|
|
static struct ctl_table x25_dir_table[] = {
|
|
{
|
|
.ctl_name = NET_X25,
|
|
.procname = "x25",
|
|
.mode = 0555,
|
|
.child = x25_table,
|
|
},
|
|
{ 0, },
|
|
};
|
|
|
|
static struct ctl_table x25_root_table[] = {
|
|
{
|
|
.ctl_name = CTL_NET,
|
|
.procname = "net",
|
|
.mode = 0555,
|
|
.child = x25_dir_table,
|
|
},
|
|
{ 0, },
|
|
};
|
|
|
|
void __init x25_register_sysctl(void)
|
|
{
|
|
x25_table_header = register_sysctl_table(x25_root_table);
|
|
}
|
|
|
|
void x25_unregister_sysctl(void)
|
|
{
|
|
unregister_sysctl_table(x25_table_header);
|
|
}
|