Commit 376bcd9b authored by Luis Chamberlain's avatar Luis Chamberlain Committed by Chuck Lever

sunrpc: simplify two-level sysctl registration for svcrdma_parm_table

There is no need to declare two tables to just create directories,
this can be easily be done with a prefix path with register_sysctl().

Simplify this registration.
Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
parent cf64b9bc
...@@ -212,24 +212,6 @@ static struct ctl_table svcrdma_parm_table[] = { ...@@ -212,24 +212,6 @@ static struct ctl_table svcrdma_parm_table[] = {
{ }, { },
}; };
static struct ctl_table svcrdma_table[] = {
{
.procname = "svc_rdma",
.mode = 0555,
.child = svcrdma_parm_table
},
{ },
};
static struct ctl_table svcrdma_root_table[] = {
{
.procname = "sunrpc",
.mode = 0555,
.child = svcrdma_table
},
{ },
};
static void svc_rdma_proc_cleanup(void) static void svc_rdma_proc_cleanup(void)
{ {
if (!svcrdma_table_header) if (!svcrdma_table_header)
...@@ -263,7 +245,8 @@ static int svc_rdma_proc_init(void) ...@@ -263,7 +245,8 @@ static int svc_rdma_proc_init(void)
if (rc) if (rc)
goto out_err; goto out_err;
svcrdma_table_header = register_sysctl_table(svcrdma_root_table); svcrdma_table_header = register_sysctl("sunrpc/svc_rdma",
svcrdma_parm_table);
return 0; return 0;
out_err: out_err:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment