Skip to content

Commit dced733

Browse files
mcgrofjankara
authored andcommitted
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: Luis Chamberlain <mcgrof@kernel.org> Signed-off-by: Jan Kara <jack@suse.cz> Message-Id: <20230310231206.3952808-4-mcgrof@kernel.org>
1 parent f768dc3 commit dced733

1 file changed

Lines changed: 1 addition & 19 deletions

File tree

fs/quota/dquot.c

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2948,32 +2948,14 @@ static struct ctl_table fs_dqstats_table[] = {
29482948
{ },
29492949
};
29502950

2951-
static struct ctl_table fs_table[] = {
2952-
{
2953-
.procname = "quota",
2954-
.mode = 0555,
2955-
.child = fs_dqstats_table,
2956-
},
2957-
{ },
2958-
};
2959-
2960-
static struct ctl_table sys_table[] = {
2961-
{
2962-
.procname = "fs",
2963-
.mode = 0555,
2964-
.child = fs_table,
2965-
},
2966-
{ },
2967-
};
2968-
29692951
static int __init dquot_init(void)
29702952
{
29712953
int i, ret;
29722954
unsigned long nr_hash, order;
29732955

29742956
printk(KERN_NOTICE "VFS: Disk quotas %s\n", __DQUOT_VERSION__);
29752957

2976-
register_sysctl_table(sys_table);
2958+
register_sysctl("fs/quota", fs_dqstats_table);
29772959

29782960
dquot_cachep = kmem_cache_create("dquot",
29792961
sizeof(struct dquot), sizeof(unsigned long) * 4,

0 commit comments

Comments
 (0)