Skip to content

Commit

Permalink
kernel/sysctl.c: rename sysctl_init() to sysctl_init_bases()
Browse files Browse the repository at this point in the history
Rename sysctl_init() to sysctl_init_bases() so to reflect exactly what
this is doing.

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Luis Chamberlain <[email protected]>
Cc: Al Viro <[email protected]>
Cc: Anil S Keshavamurthy <[email protected]>
Cc: Antti Palosaari <[email protected]>
Cc: Christian Brauner <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Eric Biederman <[email protected]>
Cc: Eric Biggers <[email protected]>
Cc: Iurii Zaikin <[email protected]>
Cc: Kees Cook <[email protected]>
Cc: Lukas Middendorf <[email protected]>
Cc: Masami Hiramatsu <[email protected]>
Cc: "Naveen N. Rao" <[email protected]>
Cc: Stephen Kitt <[email protected]>
Cc: Xiaoming Ni <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
mcgrof authored and torvalds committed Jan 22, 2022
1 parent ab171b9 commit d8c0418
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion arch/arm/mm/alignment.c
Original file line number Diff line number Diff line change
Expand Up @@ -1005,7 +1005,7 @@ static int __init noalign_setup(char *__unused)
__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
* it isn't a sysctl, and it doesn't contain sysctl information.
* We now locate it in /proc/cpu/alignment instead.
Expand Down
2 changes: 1 addition & 1 deletion arch/sh/mm/alignment.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
* it isn't a sysctl, and it doesn't contain sysctl information.
* We now locate it in /proc/cpu/alignment instead.
Expand Down
4 changes: 2 additions & 2 deletions fs/proc/proc_sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1419,7 +1419,7 @@ EXPORT_SYMBOL(register_sysctl);
* Context: Can only be called after your respective sysctl base path has been
* registered. So for instance, most base directories are registered early on
* 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,
const char *table_name)
Expand Down Expand Up @@ -1768,7 +1768,7 @@ int __init proc_sys_init(void)
proc_sys_root->proc_dir_ops = &proc_sys_dir_file_operations;
proc_sys_root->nlink = 0;

return sysctl_init();
return sysctl_init_bases();
}

struct sysctl_alias {
Expand Down
2 changes: 1 addition & 1 deletion include/linux/sysctl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

extern int sysctl_init(void);
extern int sysctl_init_bases(void);
extern void __register_sysctl_init(const char *path, struct ctl_table *table,
const char *table_name);
#define register_sysctl_init(path, table) __register_sysctl_init(path, table, #table)
Expand Down
2 changes: 1 addition & 1 deletion kernel/sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -2844,7 +2844,7 @@ DECLARE_SYSCTL_BASE(vm, vm_table);
DECLARE_SYSCTL_BASE(debug, debug_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(vm);
Expand Down

0 comments on commit d8c0418

Please sign in to comment.