aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/nfsd/nfs4state.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 316ec843dec2..442509285ca9 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -4958,7 +4958,6 @@ nfs4_state_destroy_net(struct net *net)
4958 int i; 4958 int i;
4959 struct nfs4_client *clp = NULL; 4959 struct nfs4_client *clp = NULL;
4960 struct nfsd_net *nn = net_generic(net, nfsd_net_id); 4960 struct nfsd_net *nn = net_generic(net, nfsd_net_id);
4961 struct rb_node *node, *tmp;
4962 4961
4963 for (i = 0; i < CLIENT_HASH_SIZE; i++) { 4962 for (i = 0; i < CLIENT_HASH_SIZE; i++) {
4964 while (!list_empty(&nn->conf_id_hashtbl[i])) { 4963 while (!list_empty(&nn->conf_id_hashtbl[i])) {
@@ -4967,13 +4966,11 @@ nfs4_state_destroy_net(struct net *net)
4967 } 4966 }
4968 } 4967 }
4969 4968
4970 node = rb_first(&nn->unconf_name_tree); 4969 for (i = 0; i < CLIENT_HASH_SIZE; i++) {
4971 while (node != NULL) { 4970 while (!list_empty(&nn->unconf_id_hashtbl[i])) {
4972 tmp = node; 4971 clp = list_entry(nn->unconf_id_hashtbl[i].next, struct nfs4_client, cl_idhash);
4973 node = rb_next(tmp); 4972 destroy_client(clp);
4974 clp = rb_entry(tmp, struct nfs4_client, cl_namenode); 4973 }
4975 rb_erase(tmp, &nn->unconf_name_tree);
4976 destroy_client(clp);
4977 } 4974 }
4978 4975
4979 kfree(nn->sessionid_hashtbl); 4976 kfree(nn->sessionid_hashtbl);