mirror of
https://github.com/torvalds/linux
synced 2024-09-06 09:51:23 +00:00
![Joel Granados](/assets/img/avatar_default.png)
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>
38 lines
784 B
C
38 lines
784 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
/*
|
|
* /proc/sys/fs shared sysctls
|
|
*
|
|
* These sysctls are shared between different filesystems.
|
|
*/
|
|
#include <linux/init.h>
|
|
#include <linux/sysctl.h>
|
|
|
|
static struct ctl_table fs_shared_sysctls[] = {
|
|
{
|
|
.procname = "overflowuid",
|
|
.data = &fs_overflowuid,
|
|
.maxlen = sizeof(int),
|
|
.mode = 0644,
|
|
.proc_handler = proc_dointvec_minmax,
|
|
.extra1 = SYSCTL_ZERO,
|
|
.extra2 = SYSCTL_MAXOLDUID,
|
|
},
|
|
{
|
|
.procname = "overflowgid",
|
|
.data = &fs_overflowgid,
|
|
.maxlen = sizeof(int),
|
|
.mode = 0644,
|
|
.proc_handler = proc_dointvec_minmax,
|
|
.extra1 = SYSCTL_ZERO,
|
|
.extra2 = SYSCTL_MAXOLDUID,
|
|
},
|
|
};
|
|
|
|
static int __init init_fs_sysctls(void)
|
|
{
|
|
register_sysctl_init("fs", fs_shared_sysctls);
|
|
return 0;
|
|
}
|
|
|
|
early_initcall(init_fs_sysctls);
|