Skip to content

Commit 02148ff

Browse files
committed
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>
1 parent 1119aaa commit 02148ff

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

fs/ntfs/sysctl.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,6 @@ static struct ctl_table ntfs_sysctls[] = {
3131
{}
3232
};
3333

34-
/* Define the parent directory /proc/sys/fs. */
35-
static struct ctl_table sysctls_root[] = {
36-
{
37-
.procname = "fs",
38-
.mode = 0555,
39-
.child = ntfs_sysctls
40-
},
41-
{}
42-
};
43-
4434
/* Storage for the sysctls header. */
4535
static struct ctl_table_header *sysctls_root_table;
4636

@@ -54,7 +44,7 @@ int ntfs_sysctl(int add)
5444
{
5545
if (add) {
5646
BUG_ON(sysctls_root_table);
57-
sysctls_root_table = register_sysctl_table(sysctls_root);
47+
sysctls_root_table = register_sysctl("fs", ntfs_sysctls);
5848
if (!sysctls_root_table)
5949
return -ENOMEM;
6050
} else {

0 commit comments

Comments
 (0)