mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-26 13:44:15 +08:00
sunrpc: simplify one-level sysctl registration for xr_tunables_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
3972421744
commit
17c6d0ce83
@ -140,15 +140,6 @@ static struct ctl_table xr_tunables_table[] = {
|
||||
{ },
|
||||
};
|
||||
|
||||
static struct ctl_table sunrpc_table[] = {
|
||||
{
|
||||
.procname = "sunrpc",
|
||||
.mode = 0555,
|
||||
.child = xr_tunables_table
|
||||
},
|
||||
{ },
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
static const struct rpc_xprt_ops xprt_rdma_procs;
|
||||
@ -799,7 +790,7 @@ int xprt_rdma_init(void)
|
||||
|
||||
#if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
|
||||
if (!sunrpc_table_header)
|
||||
sunrpc_table_header = register_sysctl_table(sunrpc_table);
|
||||
sunrpc_table_header = register_sysctl("sunrpc", xr_tunables_table);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user