Skip to content

Commit 176ef3c

Browse files
kbrown9Jaegeuk Kim
authored andcommitted
f2fs: 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 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. Fixes: fef4129 ("f2fs: fix to be aware discard/preflush/dio command in is_idle()") Signed-off-by: Kimberly Brown <kimbrownkd@gmail.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
1 parent 4d3aed7 commit 176ef3c

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎fs/f2fs/sysfs.c‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,7 @@ static struct attribute *f2fs_attrs[] = {
517517
ATTR_LIST(current_reserved_blocks),
518518
NULL,
519519
};
520+
ATTRIBUTE_GROUPS(f2fs);
520521

521522
static struct attribute *f2fs_feat_attrs[] = {
522523
#ifdef CONFIG_FS_ENCRYPTION
@@ -536,14 +537,15 @@ static struct attribute *f2fs_feat_attrs[] = {
536537
ATTR_LIST(sb_checksum),
537538
NULL,
538539
};
540+
ATTRIBUTE_GROUPS(f2fs_feat);
539541

540542
static const struct sysfs_ops f2fs_attr_ops = {
541543
.show = f2fs_attr_show,
542544
.store = f2fs_attr_store,
543545
};
544546

545547
static struct kobj_type f2fs_sb_ktype = {
546-
.default_attrs = f2fs_attrs,
548+
.default_groups = f2fs_groups,
547549
.sysfs_ops = &f2fs_attr_ops,
548550
.release = f2fs_sb_release,
549551
};
@@ -557,7 +559,7 @@ static struct kset f2fs_kset = {
557559
};
558560

559561
static struct kobj_type f2fs_feat_ktype = {
560-
.default_attrs = f2fs_feat_attrs,
562+
.default_groups = f2fs_feat_groups,
561563
.sysfs_ops = &f2fs_attr_ops,
562564
};
563565

0 commit comments

Comments
 (0)