Commit d8c0418a authored by Luis Chamberlain's avatar Luis Chamberlain Committed by Linus Torvalds

kernel/sysctl.c: rename sysctl_init() to sysctl_init_bases()

Rename sysctl_init() to sysctl_init_bases() so to reflect exactly what
this is doing.

Link: https://lkml.kernel.org/r/20211129211943.640266-4-mcgrof@kernel.orgSigned-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Cc: Antti Palosaari <crope@iki.fi>
Cc: Christian Brauner <christian.brauner@ubuntu.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Eric Biederman <ebiederm@xmission.com>
Cc: Eric Biggers <ebiggers@google.com>
Cc: Iurii Zaikin <yzaikin@google.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Lukas Middendorf <kernel@tuxforce.de>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: "Naveen N. Rao" <naveen.n.rao@linux.ibm.com>
Cc: Stephen Kitt <steve@sk2.org>
Cc: Xiaoming Ni <nixiaoming@huawei.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent ab171b95
...@@ -1005,7 +1005,7 @@ static int __init noalign_setup(char *__unused) ...@@ -1005,7 +1005,7 @@ static int __init noalign_setup(char *__unused)
__setup("noalign", noalign_setup); __setup("noalign", noalign_setup);
/* /*
* This needs to be done after sysctl_init, otherwise sys/ will be * This needs to be done after sysctl_init_bases(), otherwise sys/ will be
* overwritten. Actually, this shouldn't be in sys/ at all since * overwritten. Actually, this shouldn't be in sys/ at all since
* it isn't a sysctl, and it doesn't contain sysctl information. * it isn't a sysctl, and it doesn't contain sysctl information.
* We now locate it in /proc/cpu/alignment instead. * We now locate it in /proc/cpu/alignment instead.
......
...@@ -161,7 +161,7 @@ static const struct proc_ops alignment_proc_ops = { ...@@ -161,7 +161,7 @@ static const struct proc_ops alignment_proc_ops = {
}; };
/* /*
* This needs to be done after sysctl_init, otherwise sys/ will be * This needs to be done after sysctl_init_bases(), otherwise sys/ will be
* overwritten. Actually, this shouldn't be in sys/ at all since * overwritten. Actually, this shouldn't be in sys/ at all since
* it isn't a sysctl, and it doesn't contain sysctl information. * it isn't a sysctl, and it doesn't contain sysctl information.
* We now locate it in /proc/cpu/alignment instead. * We now locate it in /proc/cpu/alignment instead.
......
...@@ -1419,7 +1419,7 @@ EXPORT_SYMBOL(register_sysctl); ...@@ -1419,7 +1419,7 @@ EXPORT_SYMBOL(register_sysctl);
* Context: Can only be called after your respective sysctl base path has been * Context: Can only be called after your respective sysctl base path has been
* registered. So for instance, most base directories are registered early on * registered. So for instance, most base directories are registered early on
* init before init levels are processed through proc_sys_init() and * init before init levels are processed through proc_sys_init() and
* sysctl_init(). * sysctl_init_bases().
*/ */
void __init __register_sysctl_init(const char *path, struct ctl_table *table, void __init __register_sysctl_init(const char *path, struct ctl_table *table,
const char *table_name) const char *table_name)
...@@ -1768,7 +1768,7 @@ int __init proc_sys_init(void) ...@@ -1768,7 +1768,7 @@ int __init proc_sys_init(void)
proc_sys_root->proc_dir_ops = &proc_sys_dir_file_operations; proc_sys_root->proc_dir_ops = &proc_sys_dir_file_operations;
proc_sys_root->nlink = 0; proc_sys_root->nlink = 0;
return sysctl_init(); return sysctl_init_bases();
} }
struct sysctl_alias { struct sysctl_alias {
......
...@@ -228,7 +228,7 @@ struct ctl_table_header *register_sysctl_paths(const struct ctl_path *path, ...@@ -228,7 +228,7 @@ struct ctl_table_header *register_sysctl_paths(const struct ctl_path *path,
void unregister_sysctl_table(struct ctl_table_header * table); void unregister_sysctl_table(struct ctl_table_header * table);
extern int sysctl_init(void); extern int sysctl_init_bases(void);
extern void __register_sysctl_init(const char *path, struct ctl_table *table, extern void __register_sysctl_init(const char *path, struct ctl_table *table,
const char *table_name); const char *table_name);
#define register_sysctl_init(path, table) __register_sysctl_init(path, table, #table) #define register_sysctl_init(path, table) __register_sysctl_init(path, table, #table)
......
...@@ -2844,7 +2844,7 @@ DECLARE_SYSCTL_BASE(vm, vm_table); ...@@ -2844,7 +2844,7 @@ DECLARE_SYSCTL_BASE(vm, vm_table);
DECLARE_SYSCTL_BASE(debug, debug_table); DECLARE_SYSCTL_BASE(debug, debug_table);
DECLARE_SYSCTL_BASE(dev, dev_table); DECLARE_SYSCTL_BASE(dev, dev_table);
int __init sysctl_init(void) int __init sysctl_init_bases(void)
{ {
register_sysctl_base(kernel); register_sysctl_base(kernel);
register_sysctl_base(vm); register_sysctl_base(vm);
......
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