Skip to content

Commit 9d5b947

Browse files
Joelgranadosmcgrof
authored andcommitted
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>
1 parent e640fc5 commit 9d5b947

26 files changed

Lines changed: 0 additions & 27 deletions

fs/aio.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,6 @@ static struct ctl_table aio_sysctls[] = {
239239
.mode = 0644,
240240
.proc_handler = proc_doulongvec_minmax,
241241
},
242-
{}
243242
};
244243

245244
static void __init aio_sysctl_init(void)

fs/coredump.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -981,7 +981,6 @@ static struct ctl_table coredump_sysctls[] = {
981981
.mode = 0644,
982982
.proc_handler = proc_dointvec,
983983
},
984-
{ }
985984
};
986985

987986
static int __init init_fs_coredump_sysctls(void)

fs/dcache.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,6 @@ static struct ctl_table fs_dcache_sysctls[] = {
191191
.mode = 0444,
192192
.proc_handler = proc_nr_dentry,
193193
},
194-
{ }
195194
};
196195

197196
static int __init init_fs_dcache_sysctls(void)

fs/devpts/inode.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ static struct ctl_table pty_table[] = {
6969
.data = &pty_count,
7070
.proc_handler = proc_dointvec,
7171
},
72-
{}
7372
};
7473

7574
struct pts_mount_opts {

fs/eventpoll.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,6 @@ static struct ctl_table epoll_table[] = {
322322
.extra1 = &long_zero,
323323
.extra2 = &long_max,
324324
},
325-
{ }
326325
};
327326

328327
static void __init epoll_sysctls_init(void)

fs/exec.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2165,7 +2165,6 @@ static struct ctl_table fs_exec_sysctls[] = {
21652165
.extra1 = SYSCTL_ZERO,
21662166
.extra2 = SYSCTL_TWO,
21672167
},
2168-
{ }
21692168
};
21702169

21712170
static int __init init_fs_exec_sysctls(void)

fs/file_table.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,6 @@ static struct ctl_table fs_stat_sysctls[] = {
142142
.extra1 = &sysctl_nr_open_min,
143143
.extra2 = &sysctl_nr_open_max,
144144
},
145-
{ }
146145
};
147146

148147
static int __init init_fs_stat_sysctls(void)

fs/inode.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ static struct ctl_table inodes_sysctls[] = {
129129
.mode = 0444,
130130
.proc_handler = proc_nr_inodes,
131131
},
132-
{ }
133132
};
134133

135134
static int __init init_fs_inode_sysctls(void)

fs/lockd/svc.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,6 @@ static struct ctl_table nlm_sysctls[] = {
475475
.mode = 0644,
476476
.proc_handler = proc_dointvec,
477477
},
478-
{ }
479478
};
480479

481480
#endif /* CONFIG_SYSCTL */

fs/locks.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ static struct ctl_table locks_sysctls[] = {
111111
.proc_handler = proc_dointvec,
112112
},
113113
#endif /* CONFIG_MMU */
114-
{}
115114
};
116115

117116
static int __init init_fs_locks_sysctls(void)

0 commit comments

Comments
 (0)