diff options
author | Luis Chamberlain <mcgrof@kernel.org> | 2023-03-12 00:39:44 +0100 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2023-04-11 18:45:19 +0200 |
commit | 703c6d03f165183b97526c182aa1d701b40f0453 (patch) | |
tree | 4aa80873c2f0424499a354465020dd82d9b8216e /net | |
parent | sunrpc: move sunrpc_table and proc routines above (diff) | |
download | linux-703c6d03f165183b97526c182aa1d701b40f0453.tar.xz linux-703c6d03f165183b97526c182aa1d701b40f0453.zip |
sunrpc: simplify one-level sysctl registration for debug_table
There is no need to declare an extra tables to just create directory,
this can be easily be done with a prefix path with register_sysctl().
Simplify this registration.
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/sysctl.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/net/sunrpc/sysctl.c b/net/sunrpc/sysctl.c index afdfcc5403af..93941ab12549 100644 --- a/net/sunrpc/sysctl.c +++ b/net/sunrpc/sysctl.c @@ -163,20 +163,11 @@ static struct ctl_table debug_table[] = { { } }; -static struct ctl_table sunrpc_table[] = { - { - .procname = "sunrpc", - .mode = 0555, - .child = debug_table - }, - { } -}; - void rpc_register_sysctl(void) { if (!sunrpc_table_header) - sunrpc_table_header = register_sysctl_table(sunrpc_table); + sunrpc_table_header = register_sysctl("sunrpc", debug_table); } void |