[RHEL7,COMMIT] fs/nfs: more leaks for busy inodes case.

Submitted by Konstantin Khorenko on Aug. 6, 2019, 9:35 a.m.

Details

Message ID 201908060935.x769ZkZV004166@finist-ce7.sw.ru
State New
Series "fs/nfs: more leaks for busy inodes case."
Headers show

Commit Message

Konstantin Khorenko Aug. 6, 2019, 9:35 a.m.
The commit is pushed to "branch-rh7-3.10.0-957.21.3.vz7.106.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-957.21.3.vz7.106.7
------>
commit a0f1aed946883bdbce232a77b63d2d9311e39677
Author: Andrey Ryabinin <aryabinin@virtuozzo.com>
Date:   Tue Aug 6 12:35:46 2019 +0300

    fs/nfs: more leaks for busy inodes case.
    
    Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
---
 fs/nfs/client.c | 3 +++
 1 file changed, 3 insertions(+)

Patch hide | download patch | download mbox

diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index dede78e54f12..a41b3d61486e 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -954,6 +954,9 @@  void nfs_free_server(struct nfs_server *server)
 {
 	dprintk("--> nfs_free_server()\n");
 
+	if (server->super && !list_empty(&server->super->s_inodes))
+		return;
+
 	nfs_server_remove_lists(server);
 
 	if (server->destroy != NULL)