|
@@ -5062,7 +5062,6 @@ nfs4_state_destroy_net(struct net *net)
|
|
|
int i;
|
|
|
struct nfs4_client *clp = NULL;
|
|
|
struct nfsd_net *nn = net_generic(net, nfsd_net_id);
|
|
|
- struct rb_node *node, *tmp;
|
|
|
|
|
|
for (i = 0; i < CLIENT_HASH_SIZE; i++) {
|
|
|
while (!list_empty(&nn->conf_id_hashtbl[i])) {
|
|
@@ -5071,13 +5070,11 @@ nfs4_state_destroy_net(struct net *net)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- node = rb_first(&nn->unconf_name_tree);
|
|
|
- while (node != NULL) {
|
|
|
- tmp = node;
|
|
|
- node = rb_next(tmp);
|
|
|
- clp = rb_entry(tmp, struct nfs4_client, cl_namenode);
|
|
|
- rb_erase(tmp, &nn->unconf_name_tree);
|
|
|
- destroy_client(clp);
|
|
|
+ for (i = 0; i < CLIENT_HASH_SIZE; i++) {
|
|
|
+ while (!list_empty(&nn->unconf_id_hashtbl[i])) {
|
|
|
+ clp = list_entry(nn->unconf_id_hashtbl[i].next, struct nfs4_client, cl_idhash);
|
|
|
+ destroy_client(clp);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
kfree(nn->sessionid_hashtbl);
|