OCFS2-Devel Archive mirror
 help / color / mirror / Atom feed
From: Joseph Qi via Ocfs2-devel <ocfs2-devel@oss.oracle.com>
To: Yangtao Li <frank.li@vivo.com>, Mark Fasheh <mark@fasheh.com>,
	Joel Becker <jlbec@evilplan.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-kernel@vger.kernel.org, ocfs2-devel@oss.oracle.com,
	"Rafael J. Wysocki" <rafael@kernel.org>
Subject: Re: [Ocfs2-devel] [PATCH v2, RESEND 08/10] ocfs2: convert to kobject_del_and_put()
Date: Mon, 20 Mar 2023 11:35:05 +0800	[thread overview]
Message-ID: <308c0ee8-cf42-1342-9745-76b715086c02@linux.alibaba.com> (raw)
In-Reply-To: <20230319092641.41917-8-frank.li@vivo.com>



On 3/19/23 5:26 PM, Yangtao Li wrote:
> Use kobject_del_and_put() to simplify code.
> 
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
> ---
>  fs/ocfs2/filecheck.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/fs/ocfs2/filecheck.c b/fs/ocfs2/filecheck.c
> index 1ad7106741f8..fb9cf601245b 100644
> --- a/fs/ocfs2/filecheck.c
> +++ b/fs/ocfs2/filecheck.c
> @@ -198,8 +198,7 @@ void ocfs2_filecheck_remove_sysfs(struct ocfs2_super *osb)
>  	if (!osb->osb_fc_ent.fs_fcheck)
>  		return;
>  
> -	kobject_del(&osb->osb_fc_ent.fs_kobj);
> -	kobject_put(&osb->osb_fc_ent.fs_kobj);
> +	kobject_del_and_put(&osb->osb_fc_ent.fs_kobj);
>  	wait_for_completion(&osb->osb_fc_ent.fs_kobj_unregister);
>  	ocfs2_filecheck_sysfs_free(&osb->osb_fc_ent);
>  }

Can't find any implementation of kobject_del_and_put() in mainline.
So I guess you've introduced it at the beginning of this series? Since I
can only see this one:(
So it depends on kobject lib. If kobject lib accepts this helper, it's
fine to me.

Thanks,
Joseph

_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel@oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel

      reply	other threads:[~2023-03-20  3:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230319092641.41917-1-frank.li@vivo.com>
2023-03-19  9:26 ` [Ocfs2-devel] [PATCH v2, RESEND 08/10] ocfs2: convert to kobject_del_and_put() Yangtao Li via Ocfs2-devel
2023-03-20  3:35   ` Joseph Qi via Ocfs2-devel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=308c0ee8-cf42-1342-9745-76b715086c02@linux.alibaba.com \
    --to=ocfs2-devel@oss.oracle.com \
    --cc=frank.li@vivo.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jlbec@evilplan.org \
    --cc=joseph.qi@linux.alibaba.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark@fasheh.com \
    --cc=rafael@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).