Commit 9d5b9475 authored by Joel Granados's avatar Joel Granados Committed by Luis Chamberlain

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: default avatarJoel Granados <j.granados@samsung.com>
Reviewed-by: default avatarJan Kara <jack@suse.cz>
Reviewed-by: default avatar"Darrick J. Wong" <djwong@kernel.org>
Acked-by: default avatarChristian Brauner <brauner@kernel.org>
Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
parent e640fc5b
...@@ -239,7 +239,6 @@ static struct ctl_table aio_sysctls[] = { ...@@ -239,7 +239,6 @@ static struct ctl_table aio_sysctls[] = {
.mode = 0644, .mode = 0644,
.proc_handler = proc_doulongvec_minmax, .proc_handler = proc_doulongvec_minmax,
}, },
{}
}; };
static void __init aio_sysctl_init(void) static void __init aio_sysctl_init(void)
......
...@@ -981,7 +981,6 @@ static struct ctl_table coredump_sysctls[] = { ...@@ -981,7 +981,6 @@ static struct ctl_table coredump_sysctls[] = {
.mode = 0644, .mode = 0644,
.proc_handler = proc_dointvec, .proc_handler = proc_dointvec,
}, },
{ }
}; };
static int __init init_fs_coredump_sysctls(void) static int __init init_fs_coredump_sysctls(void)
......
...@@ -191,7 +191,6 @@ static struct ctl_table fs_dcache_sysctls[] = { ...@@ -191,7 +191,6 @@ static struct ctl_table fs_dcache_sysctls[] = {
.mode = 0444, .mode = 0444,
.proc_handler = proc_nr_dentry, .proc_handler = proc_nr_dentry,
}, },
{ }
}; };
static int __init init_fs_dcache_sysctls(void) static int __init init_fs_dcache_sysctls(void)
......
...@@ -69,7 +69,6 @@ static struct ctl_table pty_table[] = { ...@@ -69,7 +69,6 @@ static struct ctl_table pty_table[] = {
.data = &pty_count, .data = &pty_count,
.proc_handler = proc_dointvec, .proc_handler = proc_dointvec,
}, },
{}
}; };
struct pts_mount_opts { struct pts_mount_opts {
......
...@@ -322,7 +322,6 @@ static struct ctl_table epoll_table[] = { ...@@ -322,7 +322,6 @@ static struct ctl_table epoll_table[] = {
.extra1 = &long_zero, .extra1 = &long_zero,
.extra2 = &long_max, .extra2 = &long_max,
}, },
{ }
}; };
static void __init epoll_sysctls_init(void) static void __init epoll_sysctls_init(void)
......
...@@ -2165,7 +2165,6 @@ static struct ctl_table fs_exec_sysctls[] = { ...@@ -2165,7 +2165,6 @@ static struct ctl_table fs_exec_sysctls[] = {
.extra1 = SYSCTL_ZERO, .extra1 = SYSCTL_ZERO,
.extra2 = SYSCTL_TWO, .extra2 = SYSCTL_TWO,
}, },
{ }
}; };
static int __init init_fs_exec_sysctls(void) static int __init init_fs_exec_sysctls(void)
......
...@@ -142,7 +142,6 @@ static struct ctl_table fs_stat_sysctls[] = { ...@@ -142,7 +142,6 @@ static struct ctl_table fs_stat_sysctls[] = {
.extra1 = &sysctl_nr_open_min, .extra1 = &sysctl_nr_open_min,
.extra2 = &sysctl_nr_open_max, .extra2 = &sysctl_nr_open_max,
}, },
{ }
}; };
static int __init init_fs_stat_sysctls(void) static int __init init_fs_stat_sysctls(void)
......
...@@ -129,7 +129,6 @@ static struct ctl_table inodes_sysctls[] = { ...@@ -129,7 +129,6 @@ static struct ctl_table inodes_sysctls[] = {
.mode = 0444, .mode = 0444,
.proc_handler = proc_nr_inodes, .proc_handler = proc_nr_inodes,
}, },
{ }
}; };
static int __init init_fs_inode_sysctls(void) static int __init init_fs_inode_sysctls(void)
......
...@@ -475,7 +475,6 @@ static struct ctl_table nlm_sysctls[] = { ...@@ -475,7 +475,6 @@ static struct ctl_table nlm_sysctls[] = {
.mode = 0644, .mode = 0644,
.proc_handler = proc_dointvec, .proc_handler = proc_dointvec,
}, },
{ }
}; };
#endif /* CONFIG_SYSCTL */ #endif /* CONFIG_SYSCTL */
......
...@@ -111,7 +111,6 @@ static struct ctl_table locks_sysctls[] = { ...@@ -111,7 +111,6 @@ static struct ctl_table locks_sysctls[] = {
.proc_handler = proc_dointvec, .proc_handler = proc_dointvec,
}, },
#endif /* CONFIG_MMU */ #endif /* CONFIG_MMU */
{}
}; };
static int __init init_fs_locks_sysctls(void) static int __init init_fs_locks_sysctls(void)
......
...@@ -1071,7 +1071,6 @@ static struct ctl_table namei_sysctls[] = { ...@@ -1071,7 +1071,6 @@ static struct ctl_table namei_sysctls[] = {
.extra1 = SYSCTL_ZERO, .extra1 = SYSCTL_ZERO,
.extra2 = SYSCTL_TWO, .extra2 = SYSCTL_TWO,
}, },
{ }
}; };
static int __init init_fs_namei_sysctls(void) static int __init init_fs_namei_sysctls(void)
......
...@@ -5010,7 +5010,6 @@ static struct ctl_table fs_namespace_sysctls[] = { ...@@ -5010,7 +5010,6 @@ static struct ctl_table fs_namespace_sysctls[] = {
.proc_handler = proc_dointvec_minmax, .proc_handler = proc_dointvec_minmax,
.extra1 = SYSCTL_ONE, .extra1 = SYSCTL_ONE,
}, },
{ }
}; };
static int __init init_fs_namespace_sysctls(void) static int __init init_fs_namespace_sysctls(void)
......
...@@ -34,7 +34,6 @@ static struct ctl_table nfs4_cb_sysctls[] = { ...@@ -34,7 +34,6 @@ static struct ctl_table nfs4_cb_sysctls[] = {
.mode = 0644, .mode = 0644,
.proc_handler = proc_dointvec, .proc_handler = proc_dointvec,
}, },
{ }
}; };
int nfs4_register_sysctl(void) int nfs4_register_sysctl(void)
......
...@@ -29,7 +29,6 @@ static struct ctl_table nfs_cb_sysctls[] = { ...@@ -29,7 +29,6 @@ static struct ctl_table nfs_cb_sysctls[] = {
.mode = 0644, .mode = 0644,
.proc_handler = proc_dointvec, .proc_handler = proc_dointvec,
}, },
{ }
}; };
int nfs_register_sysctl(void) int nfs_register_sysctl(void)
......
...@@ -29,7 +29,6 @@ static struct ctl_table dnotify_sysctls[] = { ...@@ -29,7 +29,6 @@ static struct ctl_table dnotify_sysctls[] = {
.mode = 0644, .mode = 0644,
.proc_handler = proc_dointvec, .proc_handler = proc_dointvec,
}, },
{}
}; };
static void __init dnotify_sysctl_init(void) static void __init dnotify_sysctl_init(void)
{ {
......
...@@ -86,7 +86,6 @@ static struct ctl_table fanotify_table[] = { ...@@ -86,7 +86,6 @@ static struct ctl_table fanotify_table[] = {
.proc_handler = proc_dointvec_minmax, .proc_handler = proc_dointvec_minmax,
.extra1 = SYSCTL_ZERO .extra1 = SYSCTL_ZERO
}, },
{ }
}; };
static void __init fanotify_sysctls_init(void) static void __init fanotify_sysctls_init(void)
......
...@@ -85,7 +85,6 @@ static struct ctl_table inotify_table[] = { ...@@ -85,7 +85,6 @@ static struct ctl_table inotify_table[] = {
.proc_handler = proc_dointvec_minmax, .proc_handler = proc_dointvec_minmax,
.extra1 = SYSCTL_ZERO .extra1 = SYSCTL_ZERO
}, },
{ }
}; };
static void __init inotify_sysctls_init(void) static void __init inotify_sysctls_init(void)
......
...@@ -28,7 +28,6 @@ static struct ctl_table ntfs_sysctls[] = { ...@@ -28,7 +28,6 @@ static struct ctl_table ntfs_sysctls[] = {
.mode = 0644, /* Mode, proc handler. */ .mode = 0644, /* Mode, proc handler. */
.proc_handler = proc_dointvec .proc_handler = proc_dointvec
}, },
{}
}; };
/* Storage for the sysctls header. */ /* Storage for the sysctls header. */
......
...@@ -658,7 +658,6 @@ static struct ctl_table ocfs2_nm_table[] = { ...@@ -658,7 +658,6 @@ static struct ctl_table ocfs2_nm_table[] = {
.mode = 0644, .mode = 0644,
.proc_handler = proc_dostring, .proc_handler = proc_dostring,
}, },
{ }
}; };
static struct ctl_table_header *ocfs2_table_header; static struct ctl_table_header *ocfs2_table_header;
......
...@@ -1497,7 +1497,6 @@ static struct ctl_table fs_pipe_sysctls[] = { ...@@ -1497,7 +1497,6 @@ static struct ctl_table fs_pipe_sysctls[] = {
.mode = 0644, .mode = 0644,
.proc_handler = proc_doulongvec_minmax, .proc_handler = proc_doulongvec_minmax,
}, },
{ }
}; };
#endif #endif
......
...@@ -71,7 +71,6 @@ static struct ctl_table root_table[] = { ...@@ -71,7 +71,6 @@ static struct ctl_table root_table[] = {
.procname = "", .procname = "",
.mode = S_IFDIR|S_IRUGO|S_IXUGO, .mode = S_IFDIR|S_IRUGO|S_IXUGO,
}, },
{ }
}; };
static struct ctl_table_root sysctl_table_root = { static struct ctl_table_root sysctl_table_root = {
.default_set.dir.header = { .default_set.dir.header = {
......
...@@ -2969,7 +2969,6 @@ static struct ctl_table fs_dqstats_table[] = { ...@@ -2969,7 +2969,6 @@ static struct ctl_table fs_dqstats_table[] = {
.proc_handler = proc_dointvec, .proc_handler = proc_dointvec,
}, },
#endif #endif
{ },
}; };
static int __init dquot_init(void) static int __init dquot_init(void)
......
...@@ -26,7 +26,6 @@ static struct ctl_table fs_shared_sysctls[] = { ...@@ -26,7 +26,6 @@ static struct ctl_table fs_shared_sysctls[] = {
.extra1 = SYSCTL_ZERO, .extra1 = SYSCTL_ZERO,
.extra2 = SYSCTL_MAXOLDUID, .extra2 = SYSCTL_MAXOLDUID,
}, },
{ }
}; };
static int __init init_fs_sysctls(void) static int __init init_fs_sysctls(void)
......
...@@ -45,7 +45,6 @@ static struct ctl_table vm_userfaultfd_table[] = { ...@@ -45,7 +45,6 @@ static struct ctl_table vm_userfaultfd_table[] = {
.extra1 = SYSCTL_ZERO, .extra1 = SYSCTL_ZERO,
.extra2 = SYSCTL_ONE, .extra2 = SYSCTL_ONE,
}, },
{ }
}; };
#endif #endif
......
...@@ -24,7 +24,6 @@ static struct ctl_table fsverity_sysctl_table[] = { ...@@ -24,7 +24,6 @@ static struct ctl_table fsverity_sysctl_table[] = {
.extra2 = SYSCTL_ONE, .extra2 = SYSCTL_ONE,
}, },
#endif #endif
{ }
}; };
static void __init fsverity_init_sysctl(void) static void __init fsverity_init_sysctl(void)
......
...@@ -206,8 +206,6 @@ static struct ctl_table xfs_table[] = { ...@@ -206,8 +206,6 @@ static struct ctl_table xfs_table[] = {
.extra2 = &xfs_params.stats_clear.max .extra2 = &xfs_params.stats_clear.max
}, },
#endif /* CONFIG_PROC_FS */ #endif /* CONFIG_PROC_FS */
{}
}; };
int int
......
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