From 18168da727427e28914235137daebe06c23069cd Mon Sep 17 00:00:00 2001 From: наб Date: Sat, 15 Jan 2022 00:37:55 +0100 Subject: module/*.ko: prune .data, global .rodata MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Evaluated every variable that lives in .data (and globals in .rodata) in the kernel modules, and constified/eliminated/localised them appropriately. This means that all read-only data is now actually read-only data, and, if possible, at file scope. A lot of previously- global-symbols became inlinable (and inlined!) constants. Probably not in a big Wowee Performance Moment, but hey. Reviewed-by: Brian Behlendorf Signed-off-by: Ahelenia Ziemiańska Closes #12899 --- module/os/linux/zfs/zfs_acl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'module/os/linux/zfs/zfs_acl.c') diff --git a/module/os/linux/zfs/zfs_acl.c b/module/os/linux/zfs/zfs_acl.c index cf37aecf8..94b20dd6e 100644 --- a/module/os/linux/zfs/zfs_acl.c +++ b/module/os/linux/zfs/zfs_acl.c @@ -171,7 +171,7 @@ zfs_ace_v0_data(void *acep, void **datap) return (0); } -static acl_ops_t zfs_acl_v0_ops = { +static const acl_ops_t zfs_acl_v0_ops = { .ace_mask_get = zfs_ace_v0_get_mask, .ace_mask_set = zfs_ace_v0_set_mask, .ace_flags_get = zfs_ace_v0_get_flags, @@ -307,7 +307,7 @@ zfs_ace_fuid_data(void *acep, void **datap) } } -static acl_ops_t zfs_acl_fuid_ops = { +static const acl_ops_t zfs_acl_fuid_ops = { .ace_mask_get = zfs_ace_fuid_get_mask, .ace_mask_set = zfs_ace_fuid_set_mask, .ace_flags_get = zfs_ace_fuid_get_flags, @@ -2702,7 +2702,7 @@ zfs_zaccess_unix(znode_t *zp, mode_t mode, cred_t *cr) } /* See zfs_zaccess_delete() */ -int zfs_write_implies_delete_child = 1; +static const boolean_t zfs_write_implies_delete_child = B_TRUE; /* * Determine whether delete access should be granted. -- cgit v1.2.3