Skip to content

Commit

Permalink
Merge branch 'sysctl-next' of git://git.kernel.org/pub/scm/linux/kern…
Browse files Browse the repository at this point in the history
…el/git/mcgrof/linux.git
  • Loading branch information
Stephen Rothwell committed Mar 20, 2023
2 parents c2710a1 + 0234a6f commit 57fa6be
Show file tree
Hide file tree
Showing 27 changed files with 147 additions and 365 deletions.
18 changes: 1 addition & 17 deletions arch/arm/kernel/isa.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,27 +40,11 @@ static struct ctl_table ctl_isa_vars[4] = {

static struct ctl_table_header *isa_sysctl_header;

static struct ctl_table ctl_isa[2] = {
{
.procname = "isa",
.mode = 0555,
.child = ctl_isa_vars,
}, {}
};

static struct ctl_table ctl_bus[2] = {
{
.procname = "bus",
.mode = 0555,
.child = ctl_isa,
}, {}
};

void __init
register_isa_ports(unsigned int membase, unsigned int portbase, unsigned int portshift)
{
isa_membase = membase;
isa_portbase = portbase;
isa_portshift = portshift;
isa_sysctl_header = register_sysctl_table(ctl_bus);
isa_sysctl_header = register_sysctl("bus/isa", ctl_isa_vars);
}
15 changes: 1 addition & 14 deletions arch/csky/abiv1/alignment.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,22 +332,9 @@ static struct ctl_table alignment_tbl[5] = {
{}
};

static struct ctl_table sysctl_table[2] = {
{
.procname = "csky_alignment",
.mode = 0555,
.child = alignment_tbl},
{}
};

static struct ctl_path sysctl_path[2] = {
{.procname = "csky"},
{}
};

static int __init csky_alignment_init(void)
{
register_sysctl_paths(sysctl_path, sysctl_table);
register_sysctl_init("csky/csky_alignment", alignment_tbl);
return 0;
}

Expand Down
11 changes: 1 addition & 10 deletions arch/ia64/kernel/crash.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,15 +234,6 @@ static struct ctl_table kdump_ctl_table[] = {
},
{ }
};

static struct ctl_table sys_table[] = {
{
.procname = "kernel",
.mode = 0555,
.child = kdump_ctl_table,
},
{ }
};
#endif

static int
Expand All @@ -257,7 +248,7 @@ machine_crash_setup(void)
if((ret = register_die_notifier(&kdump_init_notifier_nb)) != 0)
return ret;
#ifdef CONFIG_SYSCTL
register_sysctl_table(sys_table);
register_sysctl("kernel", kdump_ctl_table);
#endif
return 0;
}
Expand Down
11 changes: 1 addition & 10 deletions arch/x86/entry/vdso/vdso32-setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,9 @@ static struct ctl_table abi_table2[] = {
{}
};

static struct ctl_table abi_root_table2[] = {
{
.procname = "abi",
.mode = 0555,
.child = abi_table2
},
{}
};

static __init int ia32_binfmt_init(void)
{
register_sysctl_table(abi_root_table2);
register_sysctl("abi", abi_table2);
return 0;
}
__initcall(ia32_binfmt_init);
Expand Down
11 changes: 1 addition & 10 deletions arch/x86/kernel/itmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,6 @@ static struct ctl_table itmt_kern_table[] = {
{}
};

static struct ctl_table itmt_root_table[] = {
{
.procname = "kernel",
.mode = 0555,
.child = itmt_kern_table,
},
{}
};

static struct ctl_table_header *itmt_sysctl_header;

/**
Expand Down Expand Up @@ -114,7 +105,7 @@ int sched_set_itmt_support(void)
return 0;
}

itmt_sysctl_header = register_sysctl_table(itmt_root_table);
itmt_sysctl_header = register_sysctl("kernel", itmt_kern_table);
if (!itmt_sysctl_header) {
mutex_unlock(&itmt_update_mutex);
return -ENOMEM;
Expand Down
11 changes: 1 addition & 10 deletions drivers/hv/vmbus_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1460,15 +1460,6 @@ static struct ctl_table hv_ctl_table[] = {
{}
};

static struct ctl_table hv_root_table[] = {
{
.procname = "kernel",
.mode = 0555,
.child = hv_ctl_table
},
{}
};

/*
* vmbus_bus_init -Main vmbus driver initialization routine.
*
Expand Down Expand Up @@ -1547,7 +1538,7 @@ static int vmbus_bus_init(void)
* message recording won't be available in isolated
* guests should the following registration fail.
*/
hv_ctl_table_hdr = register_sysctl_table(hv_root_table);
hv_ctl_table_hdr = register_sysctl("kernel", hv_ctl_table);
if (!hv_ctl_table_hdr)
pr_err("Hyper-V: sysctl table register error");

Expand Down
22 changes: 1 addition & 21 deletions drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/*
Expand Down Expand Up @@ -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;
Expand Down
16 changes: 1 addition & 15 deletions drivers/scsi/scsi_sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,11 @@ static struct ctl_table scsi_table[] = {
{ }
};

static struct ctl_table scsi_dir_table[] = {
{ .procname = "scsi",
.mode = 0555,
.child = scsi_table },
{ }
};

static struct ctl_table scsi_root_table[] = {
{ .procname = "dev",
.mode = 0555,
.child = scsi_dir_table },
{ }
};

static struct ctl_table_header *scsi_table_header;

int __init scsi_init_sysctl(void)
{
scsi_table_header = register_sysctl_table(scsi_root_table);
scsi_table_header = register_sysctl("dev/scsi", scsi_table);
if (!scsi_table_header)
return -ENOMEM;
return 0;
Expand Down
20 changes: 1 addition & 19 deletions drivers/xen/balloon.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,24 +97,6 @@ static struct ctl_table balloon_table[] = {
{ }
};

static struct ctl_table balloon_root[] = {
{
.procname = "balloon",
.mode = 0555,
.child = balloon_table,
},
{ }
};

static struct ctl_table xen_root[] = {
{
.procname = "xen",
.mode = 0555,
.child = balloon_root,
},
{ }
};

#else
#define xen_hotplug_unpopulated 0
#endif
Expand Down Expand Up @@ -747,7 +729,7 @@ static int __init balloon_init(void)
#ifdef CONFIG_XEN_BALLOON_MEMORY_HOTPLUG
set_online_page_callback(&xen_online_page);
register_memory_notifier(&xen_memory_nb);
register_sysctl_table(xen_root);
register_sysctl_init("xen/balloon", balloon_table);
#endif

balloon_add_regions();
Expand Down
11 changes: 1 addition & 10 deletions fs/cachefiles/error_inject.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,9 @@ static struct ctl_table cachefiles_sysctls[] = {
{}
};

static struct ctl_table cachefiles_sysctls_root[] = {
{
.procname = "cachefiles",
.mode = 0555,
.child = cachefiles_sysctls,
},
{}
};

int __init cachefiles_register_error_injection(void)
{
cachefiles_sysctl = register_sysctl_table(cachefiles_sysctls_root);
cachefiles_sysctl = register_sysctl("cachefiles", cachefiles_sysctls);
if (!cachefiles_sysctl)
return -ENOMEM;
return 0;
Expand Down
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
20 changes: 1 addition & 19 deletions fs/lockd/svc.c
Original file line number Diff line number Diff line change
Expand Up @@ -510,24 +510,6 @@ static struct ctl_table nlm_sysctls[] = {
{ }
};

static struct ctl_table nlm_sysctl_dir[] = {
{
.procname = "nfs",
.mode = 0555,
.child = nlm_sysctls,
},
{ }
};

static struct ctl_table nlm_sysctl_root[] = {
{
.procname = "fs",
.mode = 0555,
.child = nlm_sysctl_dir,
},
{ }
};

#endif /* CONFIG_SYSCTL */

/*
Expand Down Expand Up @@ -644,7 +626,7 @@ static int __init init_nlm(void)

#ifdef CONFIG_SYSCTL
err = -ENOMEM;
nlm_sysctl_table = register_sysctl_table(nlm_sysctl_root);
nlm_sysctl_table = register_sysctl("fs/nfs", nlm_sysctls);
if (nlm_sysctl_table == NULL)
goto err_sysctl;
#endif
Expand Down
21 changes: 2 additions & 19 deletions fs/nfs/nfs4sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,27 +37,10 @@ static struct ctl_table nfs4_cb_sysctls[] = {
{ }
};

static struct ctl_table nfs4_cb_sysctl_dir[] = {
{
.procname = "nfs",
.mode = 0555,
.child = nfs4_cb_sysctls,
},
{ }
};

static struct ctl_table nfs4_cb_sysctl_root[] = {
{
.procname = "fs",
.mode = 0555,
.child = nfs4_cb_sysctl_dir,
},
{ }
};

int nfs4_register_sysctl(void)
{
nfs4_callback_sysctl_table = register_sysctl_table(nfs4_cb_sysctl_root);
nfs4_callback_sysctl_table = register_sysctl("fs/nfs",
nfs4_cb_sysctls);
if (nfs4_callback_sysctl_table == NULL)
return -ENOMEM;
return 0;
Expand Down
20 changes: 1 addition & 19 deletions fs/nfs/sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,27 +32,9 @@ static struct ctl_table nfs_cb_sysctls[] = {
{ }
};

static struct ctl_table nfs_cb_sysctl_dir[] = {
{
.procname = "nfs",
.mode = 0555,
.child = nfs_cb_sysctls,
},
{ }
};

static struct ctl_table nfs_cb_sysctl_root[] = {
{
.procname = "fs",
.mode = 0555,
.child = nfs_cb_sysctl_dir,
},
{ }
};

int nfs_register_sysctl(void)
{
nfs_callback_sysctl_table = register_sysctl_table(nfs_cb_sysctl_root);
nfs_callback_sysctl_table = register_sysctl("fs/nfs", nfs_cb_sysctls);
if (nfs_callback_sysctl_table == NULL)
return -ENOMEM;
return 0;
Expand Down
Loading

0 comments on commit 57fa6be

Please sign in to comment.