summaryrefslogtreecommitdiffstats
path: root/fs/zonefs
diff options
context:
space:
mode:
authorThomas Weißschuh <linux@weissschuh.net>2023-02-10 02:14:44 +0000
committerDamien Le Moal <damien.lemoal@opensource.wdc.com>2023-02-13 08:03:48 +0900
commit2b188a2cfc4d8f319ad23832ec1390bdae52daf6 (patch)
treee42e8510807184be2a88c8371a7bc44722c2c8a6 /fs/zonefs
parent43592c46375a056b411b065acf2d37fc1e3ab251 (diff)
downloadlinux-stable-2b188a2cfc4d8f319ad23832ec1390bdae52daf6.tar.gz
linux-stable-2b188a2cfc4d8f319ad23832ec1390bdae52daf6.tar.bz2
linux-stable-2b188a2cfc4d8f319ad23832ec1390bdae52daf6.zip
zonefs: make kobj_type structure constant
Since commit ee6d3dd4ed48 ("driver core: make kobj_type constant.") the driver core allows the usage of const struct kobj_type. Take advantage of this to constify the structure definition to prevent modification at runtime. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Diffstat (limited to 'fs/zonefs')
-rw-r--r--fs/zonefs/sysfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/zonefs/sysfs.c b/fs/zonefs/sysfs.c
index 9920689dc098..8ccb65c2b419 100644
--- a/fs/zonefs/sysfs.c
+++ b/fs/zonefs/sysfs.c
@@ -79,7 +79,7 @@ static const struct sysfs_ops zonefs_sysfs_attr_ops = {
.show = zonefs_sysfs_attr_show,
};
-static struct kobj_type zonefs_sb_ktype = {
+static const struct kobj_type zonefs_sb_ktype = {
.default_groups = zonefs_sysfs_groups,
.sysfs_ops = &zonefs_sysfs_attr_ops,
.release = zonefs_sysfs_sb_release,