[Devel] [PATCH vz9 9/9] fs/nfs: more leaks for busy inodes case.

Nikita Yushchenko nikita.yushchenko at virtuozzo.com
Fri Oct 1 09:32:55 MSK 2021


From: Andrey Ryabinin <aryabinin at virtuozzo.com>

This is related to https://jira.sw.ru/browse/PSBM-95177

Signed-off-by: Andrey Ryabinin <aryabinin at virtuozzo.com>

(cherry picked from vz7 commit a0f1aed94688 ("fs/nfs: more leaks for busy inodes
case."))

Signed-off-by: Andrey Zhadchenko <andrey.zhadchenko at virtuozzo.com>

(cherry-picked from vz8 commit 3a1c9e9b96b1 ("fs/nfs: more leaks for busy inodes
case."))

Signed-off-by: Nikita Yushchenko <nikita.yushchenko at virtuozzo.com>
---
 fs/nfs/client.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index 330f65727c45..d8407416f602 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -959,6 +959,9 @@ EXPORT_SYMBOL_GPL(nfs_alloc_server);
  */
 void nfs_free_server(struct nfs_server *server)
 {
+	if (server->super && !list_empty(&server->super->s_inodes))
+		return;
+
 	nfs_server_remove_lists(server);
 
 	if (server->destroy != NULL)
-- 
2.30.2



More information about the Devel mailing list