Skip to content

Commit

Permalink
coda: simplify one-level sysctl registration for coda_table
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Luis Chamberlain <[email protected]>
  • Loading branch information
mcgrof committed Apr 13, 2023
1 parent 3d379b8 commit 1119aaa
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions fs/coda/sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1119aaa

Please sign in to comment.