Thread (83 messages) 83 messages, 9 authors, 2017-11-14
STALE3197d

[PATCH v3 08/21] nfs client: exit_net cleanup check added

From: Vasily Averin <hidden>
Date: 2017-11-06 13:24:29
Also in: linux-nfs
Subsystem: filesystems (vfs and infrastructure), nfs, sunrpc, and lockd clients, the rest · Maintainers: Alexander Viro, Christian Brauner, Trond Myklebust, Anna Schumaker, Linus Torvalds

Be sure that nfs_client_list and nfs_volume_list lists initialized
in net_init hook were return to initial state in net_exit hook.

Signed-off-by: Vasily Averin <redacted>
---
 fs/nfs/client.c | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/fs/nfs/client.c b/fs/nfs/client.c
index 22880ef..3966c98 100644
--- a/fs/nfs/client.c
+++ b/fs/nfs/client.c
@@ -204,6 +204,10 @@ void nfs_cleanup_cb_ident_idr(struct net *net)
 	struct nfs_net *nn = net_generic(net, nfs_net_id);
 
 	idr_destroy(&nn->cb_ident_idr);
+	WARN_ONCE(!list_empty(&nn->nfs_client_list),
+		  "net %x exit: nfs_client_list is not empty\n", net->ns.inum);
+	WARN_ONCE(!list_empty(&nn->nfs_volume_list),
+		  "net %x exit: nfs_volume_list is not empty\n", net->ns.inum);
 }
 
 /* nfs_client_lock held */
-- 
2.7.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help