Skip to content

Commit 703c6d0

Browse files
mcgrofamschuma-ntap
authored andcommitted
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>
1 parent 32e356b commit 703c6d0

1 file changed

Lines changed: 1 addition & 10 deletions

File tree

net/sunrpc/sysctl.c

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -163,20 +163,11 @@ static struct ctl_table debug_table[] = {
163163
{ }
164164
};
165165

166-
static struct ctl_table sunrpc_table[] = {
167-
{
168-
.procname = "sunrpc",
169-
.mode = 0555,
170-
.child = debug_table
171-
},
172-
{ }
173-
};
174-
175166
void
176167
rpc_register_sysctl(void)
177168
{
178169
if (!sunrpc_table_header)
179-
sunrpc_table_header = register_sysctl_table(sunrpc_table);
170+
sunrpc_table_header = register_sysctl("sunrpc", debug_table);
180171
}
181172

182173
void

0 commit comments

Comments
 (0)