Skip to content

Commit

Permalink
ext4: replace ktype default_attrs with default_groups
Browse files Browse the repository at this point in the history
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: Theodore Ts'o <tytso@mit.edu>
  • Loading branch information
Kimberly Brown authored and Theodore Ts'o committed Jul 2, 2019
1 parent 7633b08 commit 78e9605
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fs/ext4/sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ static struct attribute *ext4_attrs[] = {
ATTR_LIST(journal_task),
NULL,
};
ATTRIBUTE_GROUPS(ext4);

/* Features this copy of ext4 supports */
EXT4_ATTR_FEATURE(lazy_itable_init);
Expand All @@ -256,6 +257,7 @@ static struct attribute *ext4_feat_attrs[] = {
ATTR_LIST(metadata_csum_seed),
NULL,
};
ATTRIBUTE_GROUPS(ext4_feat);

static void *calc_ptr(struct ext4_attr *a, struct ext4_sb_info *sbi)
{
Expand Down Expand Up @@ -374,13 +376,13 @@ static const struct sysfs_ops ext4_attr_ops = {
};

static struct kobj_type ext4_sb_ktype = {
.default_attrs = ext4_attrs,
.default_groups = ext4_groups,
.sysfs_ops = &ext4_attr_ops,
.release = ext4_sb_release,
};

static struct kobj_type ext4_feat_ktype = {
.default_attrs = ext4_feat_attrs,
.default_groups = ext4_feat_groups,
.sysfs_ops = &ext4_attr_ops,
.release = (void (*)(struct kobject *))kfree,
};
Expand Down

0 comments on commit 78e9605

Please sign in to comment.