From: Luis Chamberlain <mcgrof@kernel.org>
To: akpm@linux-foundation.org, viro@zeniv.linux.org.uk,
keescook@chromium.org, yzaikin@google.com, nixiaoming@huawei.com,
ebiederm@xmission.com, steve@sk2.org,
mcgrof@bombadil.infradead.org, mcgrof@kernel.org,
christian.brauner@ubuntu.com, ebiggers@google.com,
naveen.n.rao@linux.ibm.com, davem@davemloft.net,
mhiramat@kernel.org, anil.s.keshavamurthy@intel.com
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 3/6] kernel/sysctl.c: rename sysctl_init() to sysctl_init_bases()
Date: Mon, 29 Nov 2021 13:19:40 -0800 [thread overview]
Message-ID: <20211129211943.640266-4-mcgrof@kernel.org> (raw)
In-Reply-To: <20211129211943.640266-1-mcgrof@kernel.org>
Rename sysctl_init() to sysctl_init_bases() so to reflect exactly
what this is doing.
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
---
arch/arm/mm/alignment.c | 2 +-
arch/sh/mm/alignment.c | 2 +-
fs/proc/proc_sysctl.c | 4 ++--
include/linux/sysctl.h | 2 +-
kernel/sysctl.c | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c
index ea81e89e7740..714dc9e43818 100644
--- a/arch/arm/mm/alignment.c
+++ b/arch/arm/mm/alignment.c
@@ -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.
diff --git a/arch/sh/mm/alignment.c b/arch/sh/mm/alignment.c
index 20aaee8db36d..3a76a766f423 100644
--- a/arch/sh/mm/alignment.c
+++ b/arch/sh/mm/alignment.c
@@ -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.
diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
index 93a49ca82d64..46cd5ff256cd 100644
--- a/fs/proc/proc_sysctl.c
+++ b/fs/proc/proc_sysctl.c
@@ -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)
@@ -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 {
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index b4b280e7b6c1..70acd2a100fd 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -227,7 +227,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)
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 8d4cab1fbe9f..421d29a86c73 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -2843,7 +2843,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);
--
2.33.0
next prev parent reply other threads:[~2021-11-29 22:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-29 21:19 [PATCH 0/6] sysctl: 5th set of kernel/sysctl cleanups Luis Chamberlain
2021-11-29 21:19 ` [PATCH 1/6] sysctl: add and use base directory declarer and registration helper Luis Chamberlain
2021-11-29 21:19 ` [PATCH 2/6] fs: move namespace sysctls and declare fs base directory Luis Chamberlain
2021-11-29 21:19 ` Luis Chamberlain [this message]
2021-11-29 21:19 ` [PATCH 4/6] printk: fix build warning when CONFIG_PRINTK=n Luis Chamberlain
2021-11-29 21:19 ` [PATCH 5/6] fs/coredump: move coredump sysctls into its own file Luis Chamberlain
2021-11-29 21:19 ` [PATCH 6/6] kprobe: move sysctl_kprobes_optimization to kprobes.c Luis Chamberlain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211129211943.640266-4-mcgrof@kernel.org \
--to=mcgrof@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=anil.s.keshavamurthy@intel.com \
--cc=christian.brauner@ubuntu.com \
--cc=davem@davemloft.net \
--cc=ebiederm@xmission.com \
--cc=ebiggers@google.com \
--cc=keescook@chromium.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mcgrof@bombadil.infradead.org \
--cc=mhiramat@kernel.org \
--cc=naveen.n.rao@linux.ibm.com \
--cc=nixiaoming@huawei.com \
--cc=steve@sk2.org \
--cc=viro@zeniv.linux.org.uk \
--cc=yzaikin@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).