* [PATCH v3 09/10] nfs: convert to kobject_del_and_put()
[not found] <20230322165905.55389-1-frank.li@vivo.com>
@ 2023-03-22 16:59 ` Yangtao Li
2023-03-22 23:36 ` Damien Le Moal
0 siblings, 1 reply; 2+ messages in thread
From: Yangtao Li @ 2023-03-22 16:59 UTC (permalink / raw)
To: Trond Myklebust, Anna Schumaker
Cc: Yangtao Li, Greg Kroah-Hartman, Rafael J. Wysocki, Damien Le Moal,
linux-nfs, linux-kernel
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/nfs/sysfs.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/nfs/sysfs.c b/fs/nfs/sysfs.c
index 0cbcd2dfa732..a6072be5fa5a 100644
--- a/fs/nfs/sysfs.c
+++ b/fs/nfs/sysfs.c
@@ -185,8 +185,7 @@ void nfs_netns_sysfs_destroy(struct nfs_net *netns)
if (clp) {
kobject_uevent(&clp->kobject, KOBJ_REMOVE);
- kobject_del(&clp->kobject);
- kobject_put(&clp->kobject);
+ kobject_del_and_put(&clp->kobject);
netns->nfs_client = NULL;
}
}
--
2.35.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v3 09/10] nfs: convert to kobject_del_and_put()
2023-03-22 16:59 ` [PATCH v3 09/10] nfs: convert to kobject_del_and_put() Yangtao Li
@ 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, Trond Myklebust, Anna Schumaker
Cc: Greg Kroah-Hartman, Rafael J. Wysocki, linux-nfs, linux-kernel
On 3/23/23 01:59, 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>
> Cc: Damien Le Moal <damien.lemoal@opensource.wdc.com>
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
--
Damien Le Moal
Western Digital Research
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-03-22 23:37 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>
2023-03-22 16:59 ` [PATCH v3 09/10] nfs: convert to kobject_del_and_put() Yangtao Li
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