public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Yangtao Li <frank.li@vivo.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2, RESEND 07/10] xfs: convert to kobject_del_and_put()
Date: Mon, 20 Mar 2023 07:58:24 -0700	[thread overview]
Message-ID: <20230320145824.GZ11376@frogsfrogsfrogs> (raw)
In-Reply-To: <20230319092641.41917-7-frank.li@vivo.com>

On Sun, Mar 19, 2023 at 05:26:38PM +0800, 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>

Looks good to me,
Acked-by: Darrick J. Wong <djwong@kernel.org>

--D

> ---
>  fs/xfs/xfs_sysfs.h | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/fs/xfs/xfs_sysfs.h b/fs/xfs/xfs_sysfs.h
> index 148893ebfdef..e2ff063e2c29 100644
> --- a/fs/xfs/xfs_sysfs.h
> +++ b/fs/xfs/xfs_sysfs.h
> @@ -48,8 +48,7 @@ static inline void
>  xfs_sysfs_del(
>  	struct xfs_kobj	*kobj)
>  {
> -	kobject_del(&kobj->kobject);
> -	kobject_put(&kobj->kobject);
> +	kobject_del_and_put(&kobj->kobject);
>  	wait_for_completion(&kobj->complete);
>  }
>  
> -- 
> 2.35.1
> 

      reply	other threads:[~2023-03-20 15:02 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 ` [PATCH v2, RESEND 07/10] xfs: convert to kobject_del_and_put() Yangtao Li
2023-03-20 14:58   ` Darrick J. Wong [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=20230320145824.GZ11376@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=frank.li@vivo.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --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