Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DFC55C433EF for ; Wed, 29 Dec 2021 01:47:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238269AbhL2Brh (ORCPT ); Tue, 28 Dec 2021 20:47:37 -0500 Received: from out30-132.freemail.mail.aliyun.com ([115.124.30.132]:57213 "EHLO out30-132.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232932AbhL2Brf (ORCPT ); Tue, 28 Dec 2021 20:47:35 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R111e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04426;MF=joseph.qi@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0V0B6Ze5_1640742452; Received: from 30.225.24.43(mailfrom:joseph.qi@linux.alibaba.com fp:SMTPD_---0V0B6Ze5_1640742452) by smtp.aliyun-inc.com(127.0.0.1); Wed, 29 Dec 2021 09:47:33 +0800 Message-ID: Date: Wed, 29 Dec 2021 09:47:32 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.4.0 Subject: Re: [PATCH] ocfs2: use default_groups in kobj_type Content-Language: en-US To: Greg Kroah-Hartman , linux-kernel@vger.kernel.org, akpm Cc: Mark Fasheh , Joel Becker , ocfs2-devel@oss.oracle.com References: <20211228144517.391660-1-gregkh@linuxfoundation.org> From: Joseph Qi In-Reply-To: <20211228144517.391660-1-gregkh@linuxfoundation.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Acked-by: Joseph Qi On 12/28/21 10:45 PM, Greg Kroah-Hartman wrote: > There are currently 2 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 aa30f47cf666 ("kobject: Add support for default > attribute groups to kobj_type") so that we can soon get rid of the > obsolete default_attrs field. > > Cc: Mark Fasheh > Cc: Joel Becker > Cc: Joseph Qi > Cc: ocfs2-devel@oss.oracle.com > Signed-off-by: Greg Kroah-Hartman > --- > fs/ocfs2/filecheck.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/fs/ocfs2/filecheck.c b/fs/ocfs2/filecheck.c > index de56e6231af8..1ad7106741f8 100644 > --- a/fs/ocfs2/filecheck.c > +++ b/fs/ocfs2/filecheck.c > @@ -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) > { > @@ -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, > };