mirror of
https://github.com/torvalds/linux
synced 2024-09-06 18:01:05 +00:00
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>
This commit is contained in:
parent
32e356be32
commit
703c6d03f1
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue