Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: Luis Chamberlain <mcgrof@kernel.org>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>

authored by

Luis Chamberlain and committed by
Chuck Lever
376bcd9b cf64b9bc

+2 -19
+2 -19
net/sunrpc/xprtrdma/svc_rdma.c
··· 212 212 { }, 213 213 }; 214 214 215 - static struct ctl_table svcrdma_table[] = { 216 - { 217 - .procname = "svc_rdma", 218 - .mode = 0555, 219 - .child = svcrdma_parm_table 220 - }, 221 - { }, 222 - }; 223 - 224 - static struct ctl_table svcrdma_root_table[] = { 225 - { 226 - .procname = "sunrpc", 227 - .mode = 0555, 228 - .child = svcrdma_table 229 - }, 230 - { }, 231 - }; 232 - 233 215 static void svc_rdma_proc_cleanup(void) 234 216 { 235 217 if (!svcrdma_table_header) ··· 245 263 if (rc) 246 264 goto out_err; 247 265 248 - svcrdma_table_header = register_sysctl_table(svcrdma_root_table); 266 + svcrdma_table_header = register_sysctl("sunrpc/svc_rdma", 267 + svcrdma_parm_table); 249 268 return 0; 250 269 251 270 out_err: