Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Joel Granados and committed by
Luis Chamberlain
9d5b9475 e640fc5b

-27
-1
fs/aio.c
··· 239 239 .mode = 0644, 240 240 .proc_handler = proc_doulongvec_minmax, 241 241 }, 242 - {} 243 242 }; 244 243 245 244 static void __init aio_sysctl_init(void)
-1
fs/coredump.c
··· 981 981 .mode = 0644, 982 982 .proc_handler = proc_dointvec, 983 983 }, 984 - { } 985 984 }; 986 985 987 986 static int __init init_fs_coredump_sysctls(void)
-1
fs/dcache.c
··· 191 191 .mode = 0444, 192 192 .proc_handler = proc_nr_dentry, 193 193 }, 194 - { } 195 194 }; 196 195 197 196 static int __init init_fs_dcache_sysctls(void)
-1
fs/devpts/inode.c
··· 69 69 .data = &pty_count, 70 70 .proc_handler = proc_dointvec, 71 71 }, 72 - {} 73 72 }; 74 73 75 74 struct pts_mount_opts {
-1
fs/eventpoll.c
··· 322 322 .extra1 = &long_zero, 323 323 .extra2 = &long_max, 324 324 }, 325 - { } 326 325 }; 327 326 328 327 static void __init epoll_sysctls_init(void)
-1
fs/exec.c
··· 2165 2165 .extra1 = SYSCTL_ZERO, 2166 2166 .extra2 = SYSCTL_TWO, 2167 2167 }, 2168 - { } 2169 2168 }; 2170 2169 2171 2170 static int __init init_fs_exec_sysctls(void)
-1
fs/file_table.c
··· 142 142 .extra1 = &sysctl_nr_open_min, 143 143 .extra2 = &sysctl_nr_open_max, 144 144 }, 145 - { } 146 145 }; 147 146 148 147 static int __init init_fs_stat_sysctls(void)
-1
fs/inode.c
··· 129 129 .mode = 0444, 130 130 .proc_handler = proc_nr_inodes, 131 131 }, 132 - { } 133 132 }; 134 133 135 134 static int __init init_fs_inode_sysctls(void)
-1
fs/lockd/svc.c
··· 475 475 .mode = 0644, 476 476 .proc_handler = proc_dointvec, 477 477 }, 478 - { } 479 478 }; 480 479 481 480 #endif /* CONFIG_SYSCTL */
-1
fs/locks.c
··· 111 111 .proc_handler = proc_dointvec, 112 112 }, 113 113 #endif /* CONFIG_MMU */ 114 - {} 115 114 }; 116 115 117 116 static int __init init_fs_locks_sysctls(void)
-1
fs/namei.c
··· 1071 1071 .extra1 = SYSCTL_ZERO, 1072 1072 .extra2 = SYSCTL_TWO, 1073 1073 }, 1074 - { } 1075 1074 }; 1076 1075 1077 1076 static int __init init_fs_namei_sysctls(void)
-1
fs/namespace.c
··· 5010 5010 .proc_handler = proc_dointvec_minmax, 5011 5011 .extra1 = SYSCTL_ONE, 5012 5012 }, 5013 - { } 5014 5013 }; 5015 5014 5016 5015 static int __init init_fs_namespace_sysctls(void)
-1
fs/nfs/nfs4sysctl.c
··· 34 34 .mode = 0644, 35 35 .proc_handler = proc_dointvec, 36 36 }, 37 - { } 38 37 }; 39 38 40 39 int nfs4_register_sysctl(void)
-1
fs/nfs/sysctl.c
··· 29 29 .mode = 0644, 30 30 .proc_handler = proc_dointvec, 31 31 }, 32 - { } 33 32 }; 34 33 35 34 int nfs_register_sysctl(void)
-1
fs/notify/dnotify/dnotify.c
··· 29 29 .mode = 0644, 30 30 .proc_handler = proc_dointvec, 31 31 }, 32 - {} 33 32 }; 34 33 static void __init dnotify_sysctl_init(void) 35 34 {
-1
fs/notify/fanotify/fanotify_user.c
··· 86 86 .proc_handler = proc_dointvec_minmax, 87 87 .extra1 = SYSCTL_ZERO 88 88 }, 89 - { } 90 89 }; 91 90 92 91 static void __init fanotify_sysctls_init(void)
-1
fs/notify/inotify/inotify_user.c
··· 85 85 .proc_handler = proc_dointvec_minmax, 86 86 .extra1 = SYSCTL_ZERO 87 87 }, 88 - { } 89 88 }; 90 89 91 90 static void __init inotify_sysctls_init(void)
-1
fs/ntfs/sysctl.c
··· 28 28 .mode = 0644, /* Mode, proc handler. */ 29 29 .proc_handler = proc_dointvec 30 30 }, 31 - {} 32 31 }; 33 32 34 33 /* Storage for the sysctls header. */
-1
fs/ocfs2/stackglue.c
··· 658 658 .mode = 0644, 659 659 .proc_handler = proc_dostring, 660 660 }, 661 - { } 662 661 }; 663 662 664 663 static struct ctl_table_header *ocfs2_table_header;
-1
fs/pipe.c
··· 1497 1497 .mode = 0644, 1498 1498 .proc_handler = proc_doulongvec_minmax, 1499 1499 }, 1500 - { } 1501 1500 }; 1502 1501 #endif 1503 1502
-1
fs/proc/proc_sysctl.c
··· 71 71 .procname = "", 72 72 .mode = S_IFDIR|S_IRUGO|S_IXUGO, 73 73 }, 74 - { } 75 74 }; 76 75 static struct ctl_table_root sysctl_table_root = { 77 76 .default_set.dir.header = {
-1
fs/quota/dquot.c
··· 2969 2969 .proc_handler = proc_dointvec, 2970 2970 }, 2971 2971 #endif 2972 - { }, 2973 2972 }; 2974 2973 2975 2974 static int __init dquot_init(void)
-1
fs/sysctls.c
··· 26 26 .extra1 = SYSCTL_ZERO, 27 27 .extra2 = SYSCTL_MAXOLDUID, 28 28 }, 29 - { } 30 29 }; 31 30 32 31 static int __init init_fs_sysctls(void)
-1
fs/userfaultfd.c
··· 45 45 .extra1 = SYSCTL_ZERO, 46 46 .extra2 = SYSCTL_ONE, 47 47 }, 48 - { } 49 48 }; 50 49 #endif 51 50
-1
fs/verity/init.c
··· 24 24 .extra2 = SYSCTL_ONE, 25 25 }, 26 26 #endif 27 - { } 28 27 }; 29 28 30 29 static void __init fsverity_init_sysctl(void)
-2
fs/xfs/xfs_sysctl.c
··· 206 206 .extra2 = &xfs_params.stats_clear.max 207 207 }, 208 208 #endif /* CONFIG_PROC_FS */ 209 - 210 - {} 211 209 }; 212 210 213 211 int