[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230322165905.55389-8-frank.li@vivo.com>
Date: Thu, 23 Mar 2023 00:59:04 +0800
From: Yangtao Li <frank.li@...o.com>
To: Trond Myklebust <trond.myklebust@...merspace.com>,
Anna Schumaker <anna@...nel.org>
Cc: Yangtao Li <frank.li@...o.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Damien Le Moal <damien.lemoal@...nsource.wdc.com>,
linux-nfs@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH v3 09/10] nfs: convert to kobject_del_and_put()
Use kobject_del_and_put() to simplify code.
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>
Cc: Damien Le Moal <damien.lemoal@...nsource.wdc.com>
Signed-off-by: Yangtao Li <frank.li@...o.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
Powered by blists - more mailing lists