Commit dced733d authored by Luis Chamberlain's avatar Luis Chamberlain Committed by Jan Kara

quota: simplify two-level sysctl registration for fs_dqstats_table

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.
Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
Signed-off-by: default avatarJan Kara <jack@suse.cz>
Message-Id: <20230310231206.3952808-4-mcgrof@kernel.org>
parent f768dc3c
...@@ -2948,24 +2948,6 @@ static struct ctl_table fs_dqstats_table[] = { ...@@ -2948,24 +2948,6 @@ static struct ctl_table fs_dqstats_table[] = {
{ }, { },
}; };
static struct ctl_table fs_table[] = {
{
.procname = "quota",
.mode = 0555,
.child = fs_dqstats_table,
},
{ },
};
static struct ctl_table sys_table[] = {
{
.procname = "fs",
.mode = 0555,
.child = fs_table,
},
{ },
};
static int __init dquot_init(void) static int __init dquot_init(void)
{ {
int i, ret; int i, ret;
...@@ -2973,7 +2955,7 @@ static int __init dquot_init(void) ...@@ -2973,7 +2955,7 @@ static int __init dquot_init(void)
printk(KERN_NOTICE "VFS: Disk quotas %s\n", __DQUOT_VERSION__); printk(KERN_NOTICE "VFS: Disk quotas %s\n", __DQUOT_VERSION__);
register_sysctl_table(sys_table); register_sysctl("fs/quota", fs_dqstats_table);
dquot_cachep = kmem_cache_create("dquot", dquot_cachep = kmem_cache_create("dquot",
sizeof(struct dquot), sizeof(unsigned long) * 4, sizeof(struct dquot), sizeof(unsigned long) * 4,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment