coda: simplify one-level sysctl registration for coda_table
authorLuis Chamberlain <mcgrof@kernel.org>
Fri, 10 Mar 2023 21:48:17 +0000 (13:48 -0800)
committerLuis Chamberlain <mcgrof@kernel.org>
Thu, 13 Apr 2023 18:49:35 +0000 (11:49 -0700)
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.

Acked-by: Jan Harkes <jaharkes@cs.cmu.edu>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
fs/coda/sysctl.c

index fda3b702b1c5aa2a4de2ded5e344f1baf63f42ab..a247c14aaab70d3d7497ea6f11734bacc0f2d1cd 100644 (file)
@@ -39,19 +39,10 @@ static struct ctl_table coda_table[] = {
        {}
 };
 
-static struct ctl_table fs_table[] = {
-       {
-               .procname       = "coda",
-               .mode           = 0555,
-               .child          = coda_table
-       },
-       {}
-};
-
 void coda_sysctl_init(void)
 {
        if ( !fs_table_header )
-               fs_table_header = register_sysctl_table(fs_table);
+               fs_table_header = register_sysctl("coda", coda_table);
 }
 
 void coda_sysctl_clean(void)