summaryrefslogtreecommitdiff
path: root/fs/ntfs
diff options
context:
space:
mode:
authorLuis Chamberlain <mcgrof@kernel.org>2023-03-10 13:49:40 -0800
committerLuis Chamberlain <mcgrof@kernel.org>2023-04-13 11:49:35 -0700
commit02148ff371b276d664780de6d1f52d52074c3e25 (patch)
treed18dedb22c60dc361a5cafbf57720e26f2ee66ca /fs/ntfs
parent1119aaa823e6cc35f2e8c8793cfa58d923a15c1b (diff)
ntfs: simplfy one-level sysctl registration for ntfs_sysctls
There is no need to declare an extra tables to just create directory, this can be easily be done with a prefix path with register_sysctl(). Simplify this registration. Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Diffstat (limited to 'fs/ntfs')
-rw-r--r--fs/ntfs/sysctl.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/fs/ntfs/sysctl.c b/fs/ntfs/sysctl.c
index a030d00af90c..174fe536a1c0 100644
--- a/fs/ntfs/sysctl.c
+++ b/fs/ntfs/sysctl.c
@@ -31,16 +31,6 @@ static struct ctl_table ntfs_sysctls[] = {
{}
};
-/* Define the parent directory /proc/sys/fs. */
-static struct ctl_table sysctls_root[] = {
- {
- .procname = "fs",
- .mode = 0555,
- .child = ntfs_sysctls
- },
- {}
-};
-
/* Storage for the sysctls header. */
static struct ctl_table_header *sysctls_root_table;
@@ -54,7 +44,7 @@ int ntfs_sysctl(int add)
{
if (add) {
BUG_ON(sysctls_root_table);
- sysctls_root_table = register_sysctl_table(sysctls_root);
+ sysctls_root_table = register_sysctl("fs", ntfs_sysctls);
if (!sysctls_root_table)
return -ENOMEM;
} else {