Skip to content

Commit 1596fc0

Browse files
namjaejeon1Naim
authored andcommitted
ntfs: fix sysctl table registration and path
The presence of a sentinel (an empty {}) at the end of the ctl_table array now causes a "sysctl table check failed" error because the kernel attempts to validate the null entry as a functional node. Deleted the empty {} from the ntfs_sysctls array to prevent the "procname is null" and "No proc_handler" errors and updated the base path from "fs" to "fs/ntfs" to ensure the ntfs-debug node is correctly located under /proc/sys/fs/ntfs/. Reported-by: Woody Suwalski <terraluna977@gmail.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
1 parent 0dbbb72 commit 1596fc0

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

fs/ntfs/sysctl.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ static const struct ctl_table ntfs_sysctls[] = {
2727
.mode = 0644, /* Mode, proc handler. */
2828
.proc_handler = proc_dointvec
2929
},
30-
{}
3130
};
3231

3332
/* Storage for the sysctls header. */
@@ -42,7 +41,7 @@ static struct ctl_table_header *sysctls_root_table;
4241
int ntfs_sysctl(int add)
4342
{
4443
if (add) {
45-
sysctls_root_table = register_sysctl("fs", ntfs_sysctls);
44+
sysctls_root_table = register_sysctl("fs/ntfs", ntfs_sysctls);
4645
if (!sysctls_root_table)
4746
return -ENOMEM;
4847
} else {

0 commit comments

Comments
 (0)