diff options
author | Luis Chamberlain <mcgrof@kernel.org> | 2023-03-10 00:37:19 -0800 |
---|---|---|
committer | Luis Chamberlain <mcgrof@kernel.org> | 2023-04-13 11:49:35 -0700 |
commit | 37b768ce3d23f79cef906aaf7427dd345b57f477 (patch) | |
tree | ebfba13acf8634150b3317158fdbbc6237ace180 /fs/lockd/svc.c | |
parent | 1dc8689e4cc651e21566e10206a84c4006e81fb1 (diff) |
lockd: simplify two-level sysctl registration for nlm_sysctls
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.
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Diffstat (limited to 'fs/lockd/svc.c')
-rw-r--r-- | fs/lockd/svc.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c index 9a47303b2cba..bb94949bc223 100644 --- a/fs/lockd/svc.c +++ b/fs/lockd/svc.c @@ -510,24 +510,6 @@ static struct ctl_table nlm_sysctls[] = { { } }; -static struct ctl_table nlm_sysctl_dir[] = { - { - .procname = "nfs", - .mode = 0555, - .child = nlm_sysctls, - }, - { } -}; - -static struct ctl_table nlm_sysctl_root[] = { - { - .procname = "fs", - .mode = 0555, - .child = nlm_sysctl_dir, - }, - { } -}; - #endif /* CONFIG_SYSCTL */ /* @@ -644,7 +626,7 @@ static int __init init_nlm(void) #ifdef CONFIG_SYSCTL err = -ENOMEM; - nlm_sysctl_table = register_sysctl_table(nlm_sysctl_root); + nlm_sysctl_table = register_sysctl("fs/nfs", nlm_sysctls); if (nlm_sysctl_table == NULL) goto err_sysctl; #endif |