mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-15 15:04:27 +08:00
md: simplify sysctl registration
register_sysctl_table() is a deprecated compatibility wrapper. register_sysctl() can do the directory creation for you so just use that. Signed-off-by: Luis Chamberlain <mcgrof@kernel.org> Acked-by: Song Liu <song@kernel.org>
This commit is contained in:
parent
525f23fe58
commit
9adcf9d3d5
@ -322,26 +322,6 @@ static struct ctl_table raid_table[] = {
|
||||
{ }
|
||||
};
|
||||
|
||||
static struct ctl_table raid_dir_table[] = {
|
||||
{
|
||||
.procname = "raid",
|
||||
.maxlen = 0,
|
||||
.mode = S_IRUGO|S_IXUGO,
|
||||
.child = raid_table,
|
||||
},
|
||||
{ }
|
||||
};
|
||||
|
||||
static struct ctl_table raid_root_table[] = {
|
||||
{
|
||||
.procname = "dev",
|
||||
.maxlen = 0,
|
||||
.mode = 0555,
|
||||
.child = raid_dir_table,
|
||||
},
|
||||
{ }
|
||||
};
|
||||
|
||||
static int start_readonly;
|
||||
|
||||
/*
|
||||
@ -9649,7 +9629,7 @@ static int __init md_init(void)
|
||||
mdp_major = ret;
|
||||
|
||||
register_reboot_notifier(&md_notifier);
|
||||
raid_table_header = register_sysctl_table(raid_root_table);
|
||||
raid_table_header = register_sysctl("dev/raid", raid_table);
|
||||
|
||||
md_geninit();
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user