Skip to content

Commit

Permalink
f2fs: 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 fields in f2fs_sb_ktype
and f2fs_feat_ktype with default_groups. Use the ATTRIBUTE_GROUPS macro
to create f2fs_groups and f2fs_feat_groups.

Signed-off-by: Kimberly Brown <kimbrownkd@gmail.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Kimberly Brown authored and Greg Kroah-Hartman committed Jun 13, 2019
1 parent c9c5b5e commit dad4afe
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fs/f2fs/sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,7 @@ static struct attribute *f2fs_attrs[] = {
ATTR_LIST(current_reserved_blocks),
NULL,
};
ATTRIBUTE_GROUPS(f2fs);

static struct attribute *f2fs_feat_attrs[] = {
#ifdef CONFIG_FS_ENCRYPTION
Expand All @@ -520,14 +521,15 @@ static struct attribute *f2fs_feat_attrs[] = {
ATTR_LIST(sb_checksum),
NULL,
};
ATTRIBUTE_GROUPS(f2fs_feat);

static const struct sysfs_ops f2fs_attr_ops = {
.show = f2fs_attr_show,
.store = f2fs_attr_store,
};

static struct kobj_type f2fs_sb_ktype = {
.default_attrs = f2fs_attrs,
.default_groups = f2fs_groups,
.sysfs_ops = &f2fs_attr_ops,
.release = f2fs_sb_release,
};
Expand All @@ -541,7 +543,7 @@ static struct kset f2fs_kset = {
};

static struct kobj_type f2fs_feat_ktype = {
.default_attrs = f2fs_feat_attrs,
.default_groups = f2fs_feat_groups,
.sysfs_ops = &f2fs_attr_ops,
};

Expand Down

0 comments on commit dad4afe

Please sign in to comment.