nfsd41: release_session when client is expired
authorMarc Eshel <eshel@almaden.ibm.com>
Fri, 3 Apr 2009 05:27:49 +0000 (08:27 +0300)
committerJ. Bruce Fields <bfields@citi.umich.edu>
Sat, 4 Apr 2009 00:41:13 +0000 (17:41 -0700)
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
[add CONFIG_NFSD_V4_1 to fix v4.0 regression bug]
Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
fs/nfsd/nfs4state.c

index b2611999600abd4a464ddac1e41389a2e3c62ce8..f23385b13065f865431f9e2130a7eb4e01ccf7e4 100644 (file)
@@ -511,6 +511,12 @@ expire_client(struct nfs4_client *clp)
                sop = list_entry(clp->cl_openowners.next, struct nfs4_stateowner, so_perclient);
                release_openowner(sop);
        }
+       while (!list_empty(&clp->cl_sessions)) {
+               struct nfsd4_session  *ses;
+               ses = list_entry(clp->cl_sessions.next, struct nfsd4_session,
+                                se_perclnt);
+               release_session(ses);
+       }
        put_nfs4_client(clp);
 }