linux-nilfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 10/10] nilfs2: convert to kobject_del_and_put()
       [not found] ` <20230322165905.55389-1-frank.li-DGpbCiVdSXo@public.gmane.org>
@ 2023-03-22 16:59   ` Yangtao Li
       [not found]     ` <20230322165905.55389-9-frank.li-DGpbCiVdSXo@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Yangtao Li @ 2023-03-22 16:59 UTC (permalink / raw)
  To: Ryusuke Konishi
  Cc: Yangtao Li, Greg Kroah-Hartman, Rafael J. Wysocki, Damien Le Moal,
	linux-nilfs-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

Use kobject_del_and_put() to simplify code.

Cc: Greg Kroah-Hartman <gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>
Cc: "Rafael J. Wysocki" <rafael-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Damien Le Moal <damien.lemoal-yzvPICuk2AC/Fx7ZUtofftBPR1lH4CV8@public.gmane.org>
Signed-off-by: Yangtao Li <frank.li-DGpbCiVdSXo@public.gmane.org>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v3 10/10] nilfs2: convert to kobject_del_and_put()
       [not found]     ` <20230322165905.55389-9-frank.li-DGpbCiVdSXo@public.gmane.org>
@ 2023-03-22 23:36       ` Damien Le Moal
  0 siblings, 0 replies; 2+ messages in thread
From: Damien Le Moal @ 2023-03-22 23:36 UTC (permalink / raw)
  To: Yangtao Li, Ryusuke Konishi
  Cc: Greg Kroah-Hartman, Rafael J. Wysocki,
	linux-nilfs-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

On 3/23/23 01:59, Yangtao Li wrote:
> Use kobject_del_and_put() to simplify code.
> 
> Cc: Greg Kroah-Hartman <gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>
> Cc: "Rafael J. Wysocki" <rafael-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> Cc: Damien Le Moal <damien.lemoal-yzvPICuk2AC/Fx7ZUtofftBPR1lH4CV8@public.gmane.org>
> Signed-off-by: Yangtao Li <frank.li-DGpbCiVdSXo@public.gmane.org>

Reviewed-by: Damien Le Moal <damien.lemoal-yzvPICuk2AC/Fx7ZUtofftBPR1lH4CV8@public.gmane.org>

-- 
Damien Le Moal
Western Digital Research


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-03-22 23:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20230322165905.55389-1-frank.li@vivo.com>
     [not found] ` <20230322165905.55389-1-frank.li-DGpbCiVdSXo@public.gmane.org>
2023-03-22 16:59   ` [PATCH v3 10/10] nilfs2: convert to kobject_del_and_put() Yangtao Li
     [not found]     ` <20230322165905.55389-9-frank.li-DGpbCiVdSXo@public.gmane.org>
2023-03-22 23:36       ` Damien Le Moal

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).