Skip to content

Commit

Permalink
ocfs2: use default_groups in kobj_type
Browse files Browse the repository at this point in the history
There are currently two ways to create a set of sysfs files for a
kobj_type, through the default_attrs field, and the default_groups
field.

Move the ocfs2 code to use default_groups field which has been the
preferred way since aa30f47 ("kobject: Add support for default
attribute groups to kobj_type") so that we can soon get rid of the
obsolete default_attrs field.

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Acked-by: Joseph Qi <[email protected]>
Cc: Mark Fasheh <[email protected]>
Cc: Joel Becker <[email protected]>
Cc: Junxiao Bi <[email protected]>
Cc: Changwei Ge <[email protected]>
Cc: Gang He <[email protected]>
Cc: Jun Piao <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
gregkh authored and torvalds committed Jan 15, 2022
1 parent e07bf00 commit 59430cc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/ocfs2/filecheck.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ static struct attribute *ocfs2_filecheck_attrs[] = {
&ocfs2_filecheck_attr_set.attr,
NULL
};
ATTRIBUTE_GROUPS(ocfs2_filecheck);

static void ocfs2_filecheck_release(struct kobject *kobj)
{
Expand Down Expand Up @@ -138,7 +139,7 @@ static const struct sysfs_ops ocfs2_filecheck_ops = {
};

static struct kobj_type ocfs2_ktype_filecheck = {
.default_attrs = ocfs2_filecheck_attrs,
.default_groups = ocfs2_filecheck_groups,
.sysfs_ops = &ocfs2_filecheck_ops,
.release = ocfs2_filecheck_release,
};
Expand Down

0 comments on commit 59430cc

Please sign in to comment.