From: Yangtao Li <frank.li@vivo.com>
To: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Cc: Yangtao Li <frank.li@vivo.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Damien Le Moal <damien.lemoal@opensource.wdc.com>,
linux-nilfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [RESEND,PATCH v2 10/10] nilfs2: convert to kobject_del_and_put()
Date: Tue, 21 Mar 2023 02:47:29 +0800 [thread overview]
Message-ID: <20230320184730.56475-9-frank.li@vivo.com> (raw)
In-Reply-To: <20230320184730.56475-1-frank.li@vivo.com>
Use kobject_del_and_put() to simplify code.
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
fs/nilfs2/sysfs.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/nilfs2/sysfs.c b/fs/nilfs2/sysfs.c
index 379d22e28ed6..150965d58ca5 100644
--- a/fs/nilfs2/sysfs.c
+++ b/fs/nilfs2/sysfs.c
@@ -1042,8 +1042,7 @@ void nilfs_sysfs_delete_device_group(struct the_nilfs *nilfs)
nilfs_sysfs_delete_segments_group(nilfs);
nilfs_sysfs_delete_superblock_group(nilfs);
nilfs_sysfs_delete_segctor_group(nilfs);
- kobject_del(&nilfs->ns_dev_kobj);
- kobject_put(&nilfs->ns_dev_kobj);
+ kobject_del_and_put(&nilfs->ns_dev_kobj);
kfree(nilfs->ns_dev_subgroups);
}
--
2.35.1
prev parent reply other threads:[~2023-03-20 18:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-20 18:47 [RESEND,PATCH v2 02/10] f2fs: convert to kobject_del_and_put() Yangtao Li
2023-03-20 18:47 ` [RESEND,PATCH v2 03/10] erofs: " Yangtao Li
2023-03-20 18:47 ` [RESEND,PATCH v2 04/10] zonefs: " Yangtao Li
2023-03-20 18:47 ` [RESEND,PATCH v2 05/10] ubifs: " Yangtao Li
2023-03-20 18:47 ` [RESEND,PATCH v2 06/10] btrfs: " Yangtao Li
2023-03-20 18:47 ` [RESEND,PATCH v2 07/10] xfs: " Yangtao Li
2023-03-20 18:47 ` [RESEND,PATCH v2 08/10] ocfs2: " Yangtao Li
2023-03-20 18:47 ` [RESEND,PATCH v2 09/10] nfs: " Yangtao Li
2023-03-20 18:47 ` Yangtao Li [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=20230320184730.56475-9-frank.li@vivo.com \
--to=frank.li@vivo.com \
--cc=damien.lemoal@opensource.wdc.com \
--cc=gregkh@linuxfoundation.org \
--cc=konishi.ryusuke@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nilfs@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;
as well as URLs for NNTP newsgroup(s).