Commit 02148ff3 authored by Luis Chamberlain's avatar Luis Chamberlain

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: default avatarLuis Chamberlain <mcgrof@kernel.org>
parent 1119aaa8
...@@ -31,16 +31,6 @@ static struct ctl_table ntfs_sysctls[] = { ...@@ -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. */ /* Storage for the sysctls header. */
static struct ctl_table_header *sysctls_root_table; static struct ctl_table_header *sysctls_root_table;
...@@ -54,7 +44,7 @@ int ntfs_sysctl(int add) ...@@ -54,7 +44,7 @@ int ntfs_sysctl(int add)
{ {
if (add) { if (add) {
BUG_ON(sysctls_root_table); 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) if (!sysctls_root_table)
return -ENOMEM; return -ENOMEM;
} else { } else {
......
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