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

ext4: replace ktype default_attrs with default_groups

The kobj_type default_attrs field is being replaced by the
default_groups field. Replace the default_attrs field in ext4_sb_ktype
and ext4_feat_ktype with default_groups. Use the ATTRIBUTE_GROUPS macro
to create ext4_groups and ext4_feat_groups.

Signed-off-by: Kimberly Brown <kimbrownkd@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Kimberly Brown and committed by
Greg Kroah-Hartman
59137a93 ef254d13

+4 -2
+4 -2
fs/ext4/sysfs.c
··· 230 230 ATTR_LIST(journal_task), 231 231 NULL, 232 232 }; 233 + ATTRIBUTE_GROUPS(ext4); 233 234 234 235 /* Features this copy of ext4 supports */ 235 236 EXT4_ATTR_FEATURE(lazy_itable_init); ··· 257 256 ATTR_LIST(metadata_csum_seed), 258 257 NULL, 259 258 }; 259 + ATTRIBUTE_GROUPS(ext4_feat); 260 260 261 261 static void *calc_ptr(struct ext4_attr *a, struct ext4_sb_info *sbi) 262 262 { ··· 376 374 }; 377 375 378 376 static struct kobj_type ext4_sb_ktype = { 379 - .default_attrs = ext4_attrs, 377 + .default_groups = ext4_groups, 380 378 .sysfs_ops = &ext4_attr_ops, 381 379 .release = ext4_sb_release, 382 380 }; 383 381 384 382 static struct kobj_type ext4_feat_ktype = { 385 - .default_attrs = ext4_feat_attrs, 383 + .default_groups = ext4_feat_groups, 386 384 .sysfs_ops = &ext4_attr_ops, 387 385 .release = (void (*)(struct kobject *))kfree, 388 386 };