mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-09-21 20:22:13 +08:00
coda: simplify one-level sysctl registration for coda_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. Acked-by: Jan Harkes <jaharkes@cs.cmu.edu> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
This commit is contained in:
parent
3d379b8d0d
commit
1119aaa823
@ -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)
|
void coda_sysctl_init(void)
|
||||||
{
|
{
|
||||||
if ( !fs_table_header )
|
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)
|
void coda_sysctl_clean(void)
|
||||||
|
Loading…
Reference in New Issue
Block a user