mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
sunrpc: simplify two-level sysctl registration for svcrdma_parm_table
[ Upstream commit 376bcd9b37 ]
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: Luis Chamberlain <mcgrof@kernel.org>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Stable-dep-of: ce89e742a4c1 ("svcrdma: fix miss destroy percpu_counter in svc_rdma_proc_init()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
03b72929f7
commit
f143df272c
@@ -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)
|
||||
{
|
||||
if (!svcrdma_table_header)
|
||||
@@ -263,7 +245,8 @@ static int svc_rdma_proc_init(void)
|
||||
if (rc)
|
||||
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;
|
||||
|
||||
out_err:
|
||||
|
||||
Reference in New Issue
Block a user