fs: Remove the now superfluous sentinel elements from ctl_table array

This commit comes at the tail end of a greater effort to remove the
empty elements at the end of the ctl_table arrays (sentinels) which
will reduce the overall build time size of the kernel and run time
memory bloat by ~64 bytes per sentinel (further information Link :
https://lore.kernel.org/all/ZO5Yx5JFogGi%2FcBo@bombadil.infradead.org/)

Remove sentinel elements ctl_table struct. Special attention was placed in
making sure that an empty directory for fs/verity was created when
CONFIG_FS_VERITY_BUILTIN_SIGNATURES is not defined. In this case we use the
register sysctl call that expects a size.

Signed-off-by: Joel Granados <j.granados@samsung.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Acked-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
This commit is contained in:
Joel Granados 2023-11-21 12:35:12 +01:00 committed by Luis Chamberlain
parent e640fc5b7b
commit 9d5b947535
26 changed files with 0 additions and 27 deletions

View File

@ -239,7 +239,6 @@ static struct ctl_table aio_sysctls[] = {
.mode = 0644,
.proc_handler = proc_doulongvec_minmax,
},
{}
};
static void __init aio_sysctl_init(void)

View File

@ -981,7 +981,6 @@ static struct ctl_table coredump_sysctls[] = {
.mode = 0644,
.proc_handler = proc_dointvec,
},
{ }
};
static int __init init_fs_coredump_sysctls(void)

View File

@ -191,7 +191,6 @@ static struct ctl_table fs_dcache_sysctls[] = {
.mode = 0444,
.proc_handler = proc_nr_dentry,
},
{ }
};
static int __init init_fs_dcache_sysctls(void)

View File

@ -69,7 +69,6 @@ static struct ctl_table pty_table[] = {
.data = &pty_count,
.proc_handler = proc_dointvec,
},
{}
};
struct pts_mount_opts {

View File

@ -322,7 +322,6 @@ static struct ctl_table epoll_table[] = {
.extra1 = &long_zero,
.extra2 = &long_max,
},
{ }
};
static void __init epoll_sysctls_init(void)

View File

@ -2165,7 +2165,6 @@ static struct ctl_table fs_exec_sysctls[] = {
.extra1 = SYSCTL_ZERO,
.extra2 = SYSCTL_TWO,
},
{ }
};
static int __init init_fs_exec_sysctls(void)

View File

@ -142,7 +142,6 @@ static struct ctl_table fs_stat_sysctls[] = {
.extra1 = &sysctl_nr_open_min,
.extra2 = &sysctl_nr_open_max,
},
{ }
};
static int __init init_fs_stat_sysctls(void)

View File

@ -129,7 +129,6 @@ static struct ctl_table inodes_sysctls[] = {
.mode = 0444,
.proc_handler = proc_nr_inodes,
},
{ }
};
static int __init init_fs_inode_sysctls(void)

View File

@ -475,7 +475,6 @@ static struct ctl_table nlm_sysctls[] = {
.mode = 0644,
.proc_handler = proc_dointvec,
},
{ }
};
#endif /* CONFIG_SYSCTL */

View File

@ -111,7 +111,6 @@ static struct ctl_table locks_sysctls[] = {
.proc_handler = proc_dointvec,
},
#endif /* CONFIG_MMU */
{}
};
static int __init init_fs_locks_sysctls(void)

View File

@ -1071,7 +1071,6 @@ static struct ctl_table namei_sysctls[] = {
.extra1 = SYSCTL_ZERO,
.extra2 = SYSCTL_TWO,
},
{ }
};
static int __init init_fs_namei_sysctls(void)

View File

@ -5010,7 +5010,6 @@ static struct ctl_table fs_namespace_sysctls[] = {
.proc_handler = proc_dointvec_minmax,
.extra1 = SYSCTL_ONE,
},
{ }
};
static int __init init_fs_namespace_sysctls(void)

View File

@ -34,7 +34,6 @@ static struct ctl_table nfs4_cb_sysctls[] = {
.mode = 0644,
.proc_handler = proc_dointvec,
},
{ }
};
int nfs4_register_sysctl(void)

View File

@ -29,7 +29,6 @@ static struct ctl_table nfs_cb_sysctls[] = {
.mode = 0644,
.proc_handler = proc_dointvec,
},
{ }
};
int nfs_register_sysctl(void)

View File

@ -29,7 +29,6 @@ static struct ctl_table dnotify_sysctls[] = {
.mode = 0644,
.proc_handler = proc_dointvec,
},
{}
};
static void __init dnotify_sysctl_init(void)
{

View File

@ -86,7 +86,6 @@ static struct ctl_table fanotify_table[] = {
.proc_handler = proc_dointvec_minmax,
.extra1 = SYSCTL_ZERO
},
{ }
};
static void __init fanotify_sysctls_init(void)

View File

@ -85,7 +85,6 @@ static struct ctl_table inotify_table[] = {
.proc_handler = proc_dointvec_minmax,
.extra1 = SYSCTL_ZERO
},
{ }
};
static void __init inotify_sysctls_init(void)

View File

@ -28,7 +28,6 @@ static struct ctl_table ntfs_sysctls[] = {
.mode = 0644, /* Mode, proc handler. */
.proc_handler = proc_dointvec
},
{}
};
/* Storage for the sysctls header. */

View File

@ -658,7 +658,6 @@ static struct ctl_table ocfs2_nm_table[] = {
.mode = 0644,
.proc_handler = proc_dostring,
},
{ }
};
static struct ctl_table_header *ocfs2_table_header;

View File

@ -1497,7 +1497,6 @@ static struct ctl_table fs_pipe_sysctls[] = {
.mode = 0644,
.proc_handler = proc_doulongvec_minmax,
},
{ }
};
#endif

View File

@ -71,7 +71,6 @@ static struct ctl_table root_table[] = {
.procname = "",
.mode = S_IFDIR|S_IRUGO|S_IXUGO,
},
{ }
};
static struct ctl_table_root sysctl_table_root = {
.default_set.dir.header = {

View File

@ -2969,7 +2969,6 @@ static struct ctl_table fs_dqstats_table[] = {
.proc_handler = proc_dointvec,
},
#endif
{ },
};
static int __init dquot_init(void)

View File

@ -26,7 +26,6 @@ static struct ctl_table fs_shared_sysctls[] = {
.extra1 = SYSCTL_ZERO,
.extra2 = SYSCTL_MAXOLDUID,
},
{ }
};
static int __init init_fs_sysctls(void)

View File

@ -45,7 +45,6 @@ static struct ctl_table vm_userfaultfd_table[] = {
.extra1 = SYSCTL_ZERO,
.extra2 = SYSCTL_ONE,
},
{ }
};
#endif

View File

@ -24,7 +24,6 @@ static struct ctl_table fsverity_sysctl_table[] = {
.extra2 = SYSCTL_ONE,
},
#endif
{ }
};
static void __init fsverity_init_sysctl(void)

View File

@ -206,8 +206,6 @@ static struct ctl_table xfs_table[] = {
.extra2 = &xfs_params.stats_clear.max
},
#endif /* CONFIG_PROC_FS */
{}
};
int