Skip to content

Commit 17c6d0c

Browse files
mcgrofamschuma-ntap
authored andcommitted
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>
1 parent 3972421 commit 17c6d0c

1 file changed

Lines changed: 1 addition & 10 deletions

File tree

net/sunrpc/xprtrdma/transport.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -140,15 +140,6 @@ static struct ctl_table xr_tunables_table[] = {
140140
{ },
141141
};
142142

143-
static struct ctl_table sunrpc_table[] = {
144-
{
145-
.procname = "sunrpc",
146-
.mode = 0555,
147-
.child = xr_tunables_table
148-
},
149-
{ },
150-
};
151-
152143
#endif
153144

154145
static const struct rpc_xprt_ops xprt_rdma_procs;
@@ -799,7 +790,7 @@ int xprt_rdma_init(void)
799790

800791
#if IS_ENABLED(CONFIG_SUNRPC_DEBUG)
801792
if (!sunrpc_table_header)
802-
sunrpc_table_header = register_sysctl_table(sunrpc_table);
793+
sunrpc_table_header = register_sysctl("sunrpc", xr_tunables_table);
803794
#endif
804795
return 0;
805796
}

0 commit comments

Comments
 (0)